r40611 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40610‎ | r40611 | r40612 >
Date:16:00, 8 September 2008
Author:simetrical
Status:old
Tags:
Comment:
"," should not be sorted as a number

This is a fix for r40382.
Modified paths:
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -618,8 +618,8 @@
619619 sortfn = ts_sort_currency;
620620 // We allow a trailing percent sign, which we just strip. This works fine
621621 // if percents and regular numbers aren't being mixed.
622 - else if (itm.match(/^[+-]?[\d,]+(\.[\d,]*)?([eE][+-]?[\d,]+)?\%?$/) ||
623 - itm.match(/^[+-]?\.[\d,]+([eE][+-]?[\d,]+)?\%?$/) ||
 622+ else if (itm.match(/^[+-]?\d[\d,]*(\.[\d,]*)?([eE][+-]?\d[\d,]*)?\%?$/) ||
 623+ itm.match(/^[+-]?\.\d[\d,]*([eE][+-]?\d[\d,]*)?\%?$/) ||
624624 itm.match(/^0x[\da-f]+$/i))
625625 sortfn = ts_sort_numeric;
626626

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40382Fix for r40379, allow commas againsimetrical14:02, 3 September 2008