User:Ohconfucius/script/MOSNUM dates.js: Difference between revisions

Content deleted Content added
disappeared date
update protection and softening unlinking of all centuries
Line 189:
 
// century
.replace(/\[\[((?:first|second|third|(?:(?:thir|four|fif|six|seven|eigh|nin|ten|eleven|twelf|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteennine)teen|twentie)th|twenty[\s\-]first[\s\-])centur(?:y|ies)(?:\s(?:AD|BC|CE|BCE))?)\]\]/gi, "$1")
.replace(/\[\[(?:first|second|third|(?:(?:thir|four|fif|six|seven|eigh|nin|ten|eleven|twelf|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteennine)teen|twentie)th|twenty[\s\-]first)[\s\-_]centur(?:y|ies)(?:\s(?:AD|BC|CE|BCE))?\|([^\]]{1,30})\]\]/gi, "$1")
.replace(/\[\[(\d{1,2}(?:st|[nr]d|th))[\s\-_](centur(?:y|ies))(\s(?:AD|BC|CE|BCE)|)\]\]/gi, "$1 $2$3")
.ohc_regex(/\[\[\d{1,2}@th[\s\-_]centur(?:y|ies)(?:\s(?:AD|BC|CE|BCE)|)\|([^\]]{1,30})\]\]/gi, "$1")
 
// months
Line 918:
.replace(/(\{(?:See ?also|Main))(\|[^}]*)(\})/gi, protect_function)
.replace(/(\{\{(?:double ?|external ?|wide ?)image\s?\|)([^}]+)(\})/gi, protect_function)
.replace(/(\{\{(?:Single chart|harvnb|r|wikisource)\|)([^}]+)(\})/gi, protect_function) //protect Single chart template 21/06/25
.replace(/(\{\{(?:About-distinguish-text)\s*\|)([^}]+)(\}\})/gi, protect_function)
.replace(/(\{\{(?:Canadian federal by-election))([^}]+)(\}\})/gi, protect_function)