From 5f366762f7107f7582ec8714efe51bc356b10779 Mon Sep 17 00:00:00 2001 From: Mottie Date: Tue, 18 Feb 2014 12:40:10 -0600 Subject: [PATCH] currency parser update: detect with +/- symbols --- 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 57bf8bda..a4225c86 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -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);