I'm using the current master of https://github.com/Mottie/tablesorter, which I've updated to from the older tablesorter for the ability to the use the Filter widget. But in doing so, I've run across an issue where it seems to fail sorting digits with leading 0's, when asked to use the 'text' sorter.
Example:
headers:
0:
sorter: 'text'
On a column with values
- 001
- 1
- 1
- 01
- 1
- 0001
I am expecting a sorted value to be
- 0001
- 001
- 01
- 1
- 1
- 1
But instead it appears to be parsing it as a digit as the leading 0 has no affect on the sort order.
jsFiddles:
I've created a basic jsFiddle here: https://jsfiddle.net/ewjg8mob/ to display my need.
Another jsFiddle to show that the sorting is 'working' but appears to be stripping the leading 0's, which to me means it's sorting as a digit.
I've tried this with the most recent version jQuery 1, 2 and 3.
NOTE The 'old' Tablesorter did this correctly, but the newer fork seems to be having issues.