Fix for r40379, allow commas again
authorAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 3 Sep 2008 14:02:32 +0000 (14:02 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 3 Sep 2008 14:02:32 +0000 (14:02 +0000)
skins/common/wikibits.js

index fa6fe83..34608c7 100644 (file)
@@ -618,9 +618,9 @@ function ts_resortTable(lnk) {
                sortfn = ts_sort_currency;
        // We allow a trailing percent sign, which we just strip.  This works fine
        // if percents and regular numbers aren't being mixed.
-       else if (itm.match(/^[+-]?[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?\%?$/) ||
-       itm.match(/^[+-]?\.[0-9]+([eE][+-]?[0-9]+)?\%?$/) ||
-       itm.match(/^0[xX][0-9a-fA-F]+$/))
+       else if (itm.match(/^[+-]?[\d,]+(\.[\d,]*)?([eE][+-]?[\d,]+)?\%?$/) ||
+       itm.match(/^[+-]?\.[\d,]+([eE][+-]?[\d,]+)?\%?$/) ||
+       itm.match(/^0x[\da-f]+$/i))
                sortfn = ts_sort_numeric;
 
        var reverse = (span.getAttribute("sortdir") == 'down');