From 11e48bd03b80d57e6e242ad94a707ced00d81aee Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 27 Dec 2009 15:44:24 +0000 Subject: [PATCH] - in regex character classes has special meaning Fix for r60376, pointed out by Thana on bug 21946. --- 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 95b2e06974..11361df20b 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -705,9 +705,9 @@ function ts_initTransformTable() { // if percents and regular numbers aren't being mixed. ts_number_regex = new RegExp( "^(" + - "[+-\u2212]?[0-9][0-9,]*(\\.[0-9,]*)?(E[+-\u2212]?[0-9][0-9,]*)?" + // Fortran-style scientific + "[-+\u2212]?[0-9][0-9,]*(\\.[0-9,]*)?(E[-+\u2212]?[0-9][0-9,]*)?" + // Fortran-style scientific "|" + - "[+-\u2212]?" + digitClass + "+%?" + // Generic localised + "[-+\u2212]?" + digitClass + "+%?" + // Generic localised ")$", "i" ); } -- 2.20.1