User:PleaseStand/segregate-refs-dev.js: Difference between revisions

Content deleted Content added
m minor bugfix
don't mess with commented out refs
Line 124:
// The tags listed below other than "ref" are there for an obvious reason.
// NB: "references" is here to prevent out-of-line refs from being returned.
this.refScanRegex = /(?:<(nowiki|source|references|ref)(?:\s|(?:[^"']|"[^"]*"|'[^']*')*?)(?:\/>|(?:>[\s\S]*?<\/\1(?:|\s[^>]*)>))|<!--.*?-->)/gi;
}
RefScanner.prototype = {
Line 132:
while(results[1].toString().toLowerCase() != "ref") {
results = this.refScanRegex.exec(this.wikiText);
if(!results || typeof results[1] == "undefined") {
return null;
}