mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
currency parser update: detect with +/- symbols
This commit is contained in:
parent
fc6d0961b0
commit
5f366762f7
@ -1488,7 +1488,7 @@
|
||||
ts.addParser({
|
||||
id: "currency",
|
||||
is: function(s) {
|
||||
return (/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/).test((s || '').replace(/[,. ]/g,'')); // £$€¤¥¢
|
||||
return (/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/).test((s || '').replace(/[+\-,. ]/g,'')); // £$€¤¥¢
|
||||
},
|
||||
format: function(s, table) {
|
||||
var n = ts.formatFloat((s || '').replace(/[^\w,. \-()]/g, ""), table);
|
||||
|
Loading…
Reference in New Issue
Block a user