From dc27ec298661b67190dc888b6105c83353468775 Mon Sep 17 00:00:00 2001 From: Mottie Date: Sat, 26 Oct 2013 05:41:39 -0500 Subject: [PATCH] better formatFloat replace method --- js/jquery.tablesorter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index fe65dd0f..49974e0a 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1317,7 +1317,7 @@ } if(/^\s*\([.\d]+\)/.test(s)) { // make (#) into a negative number -> (10) = -10 - s = s.replace(/^\s*\(/,'-').replace(/\)/,''); + s = s.replace(/^\s*\(([.\d]+)\)/, '-$1'); } i = parseFloat(s); // return the text instead of zero