Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -616,7 +616,11 @@ |
617 | 617 | // pound dollar euro yen currency cents |
618 | 618 | else if (itm.match(/(^[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/)) |
619 | 619 | sortfn = ts_sort_currency; |
620 | | - else if (itm.match(/^[\d.,eE+-]+\%?$/)) |
| 620 | + // We allow a trailing percent sign, which we just strip. This works fine |
| 621 | + // if percents and regular numbers aren't being mixed. |
| 622 | + else if (itm.match(/^[+-]?[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?\%?$/) || |
| 623 | + itm.match(/^[+-]?\.[0-9]+([eE][+-]?[0-9]+)?\%?$/) || |
| 624 | + itm.match(/^0[xX][0-9a-fA-F]+$/)) |
621 | 625 | sortfn = ts_sort_numeric; |
622 | 626 | |
623 | 627 | var reverse = (span.getAttribute("sortdir") == 'down'); |