אונטערשייד צווישן ווערסיעס פון "מעדיעוויקי:Gadget-Checkty.js"

קיין רעדאגירונג באמערקונג
(טויש נישט אינטערשפראך לינקס)
אין תקציר עריכה
שורה 598: שורה 598:
         var specials = [],
         var specials = [],
             ignoreRegex = new RegExp('(' + this.ignoreRegexes.join('|') + ')');
             ignoreRegex = new RegExp('(' + this.ignoreRegexes.join('|') + ')');
            const interlanguageLinkPattern = /^\s*\[\[[a-z\-]{2,12}:[^\]]+\]\]\s*$/i;
            if ( interlanguageLinkPattern.test(t) ) {
            }
         for (i in this.regexes) // assume regexs on templates are safe if contain template wikicode
         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)) {
             if (/\\{\\{/.test(this.regexes[i][0]) && this.regexes[i][0].test(t)) {
שורה 610: שורה 607:
             }
             }
         while (true) { //extract inner links, inner templates and inner params - we don't want to sptit those.
         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]\[[^\{\}\[]*\])/);
             match = t.match(/(\{\{[^\{\}]*\}\}|(\n|\[\[)(?:File|תמונה|קובץ|טעקע|בילד):.*?[\|\n]|[^\[\0]\[[^\{\}\[]*\])/);
             if ((!match || !match.length) && this.ignoreRegexes.length) match = t.match(ignoreRegex);
             if ((!match || !match.length) && this.ignoreRegexes.length) match = t.match(ignoreRegex);
             if (!match || !match.length) break;
             if (!match || !match.length) {
        // Check for interlanguage links
        match = t.match(/\[\[[a-z]{2}:[^\[\]]+\]\]/);
        if (!match || !match.length) break;
        }
             specials.push(match[0]);
             specials.push(match[0]);
             t = t.replace(match[0], "\0" + specials.length + "\0");
             t = t.replace(match[0], "\0" + specials.length + "\0");