mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
better formatFloat replace method
This commit is contained in:
parent
c186b3024b
commit
dc27ec2986
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user