מייבאים כמותיים, בדוקי עריכות אוטומטית, ביוראקראטן, אינטערפעיס רעדאקטארן, emailconfirmed, אינטערפעיס אדמיניסטראַטאָרן, מנטרים, סיסאפן, צוות טכני, מייבאים, מעדכנים, אספקלריה רעדאקטארן
102,362
רעדאגירונגען
(נאכנישט) |
(כצ"ל) |
||
| שורה 141: | שורה 141: | ||
}, | }, | ||
{ | { | ||
// notes: at least 2 numbers - avoid chess notation replacement, English links - full link to avoid | | |||
from: /( [בלמהוכ])(?:- |)(\[\[[A-Za-z0-9 ]*\]\]|[A-Za-z]|(?:\[\[)?[0-9]{2,})/g, | |||
to: '$1־$2', | |||
comment: 'מיקוף למספרים ולעז' | |||
}, | }, | ||
{ // move , suffix outside links | { // move , suffix outside links | ||
| שורה 335: | שורה 335: | ||
this.rawLinks(); | this.rawLinks(); | ||
} | } | ||
this.rabbiLinks(); | |||
this.overlinkify(); | this.overlinkify(); | ||
this.nakedLinks(); | this.nakedLinks(); | ||
| שורה 1,249: | שורה 1,249: | ||
}).click(function () { | }).click(function () { | ||
// insert interlink | // insert interlink | ||
var inter = prompt('שטעלט אריין דעם נאמען פון ערך אויף המכלול העברי'); | |||
if (inter) { | |||
chectTyTool.textbox.value += '\n[' + '[he:' + inter + ']]'; | |||
chectTyTool.addSummary('צוגעלייגט אינטערשפראך לינק'); | |||
} | |||
return false; | return false; | ||
})); | })); | ||
| שורה 1,325: | שורה 1,325: | ||
// Check if the second part equals the concatenation of the first and third parts | // Check if the second part equals the concatenation of the first and third parts | ||
// רבי [[רבי שלמה|שלמה]] = [[רבי שלמה]] | // רבי [[רבי שלמה|שלמה]] = [[רבי שלמה]] | ||
var pattern = /\[\[([^ | // Define the regular expression pattern with the global flag | ||
function replaceMatch(match, | var pattern = /(\S+)\s*\[\[([^\]]+\|[^\]]+)\]\]/g; | ||
// Check if the | // Define a function to be used as a replacement | ||
if ( | function replaceMatch(match, precedingWord, enclosedString) { | ||
return '[[' + | var parts = enclosedString.split('|'); | ||
var validPrefixes = ['רבי', 'הרב', 'הר"ר', 'ר\'']; | |||
// Check if the parts are equivalent | |||
if (parts[0] === 'רבי ' + parts[1] || parts[0] === 'הרב ' + parts[1]) { | |||
if (validPrefixes.includes(precedingWord)) { | |||
// Delete redundant title before link | |||
return '[[' + parts[0] + ']]'; | |||
} else { | |||
// Word before is something else | |||
return precedingWord + ' [[' + parts[0] + ']]'; | |||
} | |||
} else { | } else { | ||
// If not, return the original match | // If not, return the original match | ||
| שורה 1,339: | שורה 1,349: | ||
if (wikitext != this.textbox.value) { | if (wikitext != this.textbox.value) { | ||
this.textbox.value = wikitext; | this.textbox.value = wikitext; | ||
chectTyTool.addSummary(' | chectTyTool.addSummary('פארראכטן רבי לינקס'); | ||
} | } | ||
}, | }, | ||
רעדאגירונגען