repaired text strings in numerical sort functionality

This commit is contained in:
Rob Garrison 2012-04-17 12:29:18 -05:00
parent 48f2a885e4
commit f014e3cb6b
4 changed files with 10 additions and 6 deletions

View File

@ -35,6 +35,10 @@ tablesorter can successfully parse and sort many types of data including linked
View the [complete listing here](https://github.com/Mottie/tablesorter/wiki/Change).
#### Version 2.1.13 (4/17/2012)
* Modified "digit" parser to not remove alphabetical characters as it was breaking the [text strings in numerical sort](http://mottie.github.com/tablesorter/docs/example-options-headers-digits-strings.html) functionality.
#### Version 2.1.12 (4/16/2012)
* Modified digit parser to assume numbers wrapped in parenthesis are negative numbers.

View File

@ -1,5 +1,5 @@
/*!
* TableSorter 2.1.12 - Client-side table sorting with ease!
* TableSorter 2.1.13 - Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
* Copyright (c) 2007 Christian Bach
@ -18,7 +18,7 @@
$.extend({
tablesorter: new function(){
this.version = "2.1.12";
this.version = "2.1.13";
var parsers = [], widgets = [], tbl;
this.defaults = {
@ -811,7 +811,7 @@
return $.tablesorter.isDigit(s);
},
format: function(s){
return $.tablesorter.formatFloat(s.replace(/[^0-9,. \-()]/g, ""));
return $.tablesorter.formatFloat(s.replace(/[^\w,. \-()]/g, ""));
},
type: "numeric"
});

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "tablesorter",
"version": "2.1.12",
"version": "2.1.13",
"title": "tablesorter",
"author": {
"name": "Christian Bach",