From: Aryeh Gregor Date: Mon, 8 Sep 2008 16:00:21 +0000 (+0000) Subject: "," should not be sorted as a number X-Git-Tag: 1.31.0-rc.0~45408 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=7954164c91bf724e13d80c7d99a8fe0b47fc9fc4;p=lhc%2Fweb%2Fwiklou.git "," should not be sorted as a number This is a fix for r40382. --- diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 34608c7017..46e814cebe 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -618,8 +618,8 @@ 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(/^[+-]?[\d,]+(\.[\d,]*)?([eE][+-]?[\d,]+)?\%?$/) || - itm.match(/^[+-]?\.[\d,]+([eE][+-]?[\d,]+)?\%?$/) || + else if (itm.match(/^[+-]?\d[\d,]*(\.[\d,]*)?([eE][+-]?\d[\d,]*)?\%?$/) || + itm.match(/^[+-]?\.\d[\d,]*([eE][+-]?\d[\d,]*)?\%?$/) || itm.match(/^0x[\da-f]+$/i)) sortfn = ts_sort_numeric;