User:Cacycle/wikEd.js and Wikipedia:Sandbox: Difference between pages
(Difference between pages)
Content deleted Content added
0.9.99 (March 03, 2011): Preview Webkit fix, local storage detection, fixed regexp declaration in while statement, setEndNode testfix, config option: unhide with shift/ctrl |
m Proposed changes for User:Cacycle/wikEd.js, according to User_talk:Cacycle/wikEd#Fixes_for_regex_rules_parsing |
||
Line 3,765: | Line 3,765: | ||
// parse regexp rules |
// parse regexp rules |
||
var regExp = / |
var regExp = /<(?:Typo)?\s+(?:word="(.*?)"\s+)?find="(.*?)"\s+replace="(.*?)"\s*\/?>/g; |
||
while ( (regExpMatch = regExp.exec(rulesTxt)) != null) { |
while ( (regExpMatch = regExp.exec(rulesTxt)) != null) { |
||
Line 3,771: | Line 3,771: | ||
var regExpFind; |
var regExpFind; |
||
try { |
try { |
||
mw.log( 'Invalid regex:\nfind=' + regExpMatch[2] + '\nreplace=' + regExpMatch[3]); |
|||
regExpFind = new RegExp(regExpMatch[2], 'gm'); |
regExpFind = new RegExp(regExpMatch[2], 'gm'); |
||
} |
} |