מדיה ויקי:Gadget-Checkty.js – הבדלי גרסאות
תוכן שנמחק תוכן שנוסף
מ escape נכון - \\ במקום \ |
מ תיקון באג בטיפול בביטוים רגולריים להחרגה. (אלו ביטויים רגולריים ולא מחרוזות) |
||
שורה 103:
}],
regexes: [],
run: function () {
if (this != chectTyTool) {
שורה 387:
}
if (data) {
var lines = data.split(/\n/)
while (lines.length) {
if (!(matches = lines.shift().match(/^\|(\d+)/))) continue;
שורה 403:
if (!(matches = lines.shift().match(clear_nowiki))) continue;
this.regexes[num] = [regex, matches[1]];
var ignore = lines.shift()
}
}
if (protect) {
// add titles of pages explicitly marked as special
while (pTitle = protect_title_regex.exec(protect)) {
this.
this.
}
}
שורה 445 ⟵ 446:
}
var specials = [],
ignoreRegex = new RegExp('(' + this.
for (i in this.regexes) // assume regexs on templates are safe if contain template wikicode
if (/\\{\\{/.test(this.regexes[i][0]) && this.regexes[i][0].test(t)) {
שורה 454 ⟵ 455:
while (true) { //extract inner links, inner templates and inner params - we don't want to sptit those.
match = t.match(/(\{\{[^\{\}]*\}\}|(\n|\[\[)(?:File|קובץ|תמונה|Image):.*?[\|\n]|[^\[\0]\[[^\{\}\[]*\])/);
if ((!match || !match.length) && this.
if (!match || !match.length) break;
specials.push(match[0]);
|