r87005 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87004‎ | r87005 | r87006 >
Date:11:02, 27 April 2011
Author:diebuche
Status:ok (Comments)
Tags:
Comment:
TableSorter: Allow whitespace between digits and percent sign. Fixes Bug 28406
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.tablesorter.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.tablesorter.js
@@ -415,7 +415,7 @@
416416 // We allow a trailing percent sign, which we just strip. This works fine
417417 // if percents and regular numbers aren't being mixed.
418418 ts.numberRegex = new RegExp("^(" + "[-+\u2212]?[0-9][0-9,]*(\\.[0-9,]*)?(E[-+\u2212]?[0-9][0-9,]*)?" + // Fortran-style scientific
419 - "|" + "[-+\u2212]?" + digitClass + "+%?" + // Generic localised
 419+ "|" + "[-+\u2212]?" + digitClass + "+[\\s\\xa0]*%?" + // Generic localised
420420 ")$", "i");
421421 }
422422

Comments

#Comment by Krinkle (talk | contribs)   16:57, 27 April 2011

Does this allow or require whitespace in-between ?

#Comment by (talk | contribs)   17:34, 28 June 2011

It allows whitespaces. In short: /\d+\s*%?/

Status & tagging log