If this parser finds the file type extension within the equivalents list, it will add the equivalents group name to the beginning of the file so that during sorting, those file names will sort by the group they are in.
Please look in the javascript code section below for a full list of default equivalents. This list is by no means extensive, but it can be easily modified or extended as needed.
To add a new group to the equivalents list, just define a new group, before initializing tablesorter, as follows:
But lets say your table is primarily being used to sort font file names, but you notice "svg" is listed under "vectors" (graphics) so you want to modify the equivalents list. Do it as follows:
$.tablesorter.fileTypes.equivalents["Vectors"] = "awg|ai|eps|cdr"; // redefine vectors without "svg"
$.tablesorter.fileTypes.equivalents["Fonts"] += '|svg'; // just add it to the end (but first include the vertical bar = shift+\; above the enter key)!
This parser only looks to see if an extension exists within the equivalents list, so any separator can be used (spaces, commas or vertical bars).
Demo
(swap media column between "group-separator-1" & "group-separator-2")
Desktop Files
Tablesorter Files
Media
Media Files
github.url
package.json
Music Disc #1 - Green Day - Boulevard of Broken Dreams
Muse - Supermassive Black Hole.mp3
tablesorter.zip
readme.md
Music Disc #1 - Green Day - Holiday
Gorillaz - Feel Good Inc.mp3
learn-git.pdf
index.html
Music Disc #1 - M83 - Midnight City
M83 - Midnight City.mp4
pancake-cat.jpg
jquery.tablesorter.js
Music Disc #1 - Bob Marley - Everything is Gonna Be Alright
Radiohead - Creep.ogg
to-do-list.txt
theme.blue.css
Music Disc #1 - Bob Marley - Jamming
Ellie Goulding - Lights.flv
css-tips.docx
theme.less
Music Disc #1 - Bob Marley - Oh, Baby I Love Your Way