From 7954164c91bf724e13d80c7d99a8fe0b47fc9fc4 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Mon, 8 Sep 2008 16:00:21 +0000 Subject: [PATCH] "," should not be sorted as a number This is a fix for r40382. --- skins/common/wikibits.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.20.1