Content deleted Content added
Ohconfucius (talk | contribs) No edit summary Tag: Reverted |
Ohconfucius (talk | contribs) fully protect archive-url with built-in spacces |
||
(3 intermediate revisions by the same user not shown) | |||
Line 276:
// remove parasitic metadata - days of the week/descriptives
.ohc_regex(/(\|\s*(?:publication|archive|access|air|)-?date\s*=\s*)(?:[^|}\d]*|)@Day\s+@Month\s+@YYYY((?:[a-z]\b|)\s?)
.ohc_regex(/(\|\s*(?:publication|archive|access|air|)-?date\s*=\s*)[^|}]*@Month\s+@Day,\s+@YYYY((?:[a-z]\b|)\s?)
//.ohc_regex(/(\|\s*date\s*=\s*)(?:[^|}–<]*\D|)@Day\s+@Month\s+@YYYY ?– ?@Day\s+@Month\s+@YYYY[^|}–<]*(?=[\s\n]*[<|}])/gi, "$1@Day1 @Mon1 @Year1 – @Day2 @Mon2 @Year2")
//.ohc_regex(/(\|\s*date\s*=\s*)[^|}–<]*@Month\s+@Day,\s+@YYYY ?– ?@Month @Day, @YYYY[^|}–<]*(?=[\s\n]*[<|}])/gi, "$1@Mon1 @Day1, @Year1 – @@Mon2 Day2, @Year2")
Line 345:
// long-hand palliative for observed failure to insert spaces
.ohc_regex(/(\|\s*(?:archive|access|air)-?date\s*=\s*)(?:on |)([0-2]?\d|30|31)\s*(January|February|March|April|May|June|July|August|September|October|November|December)\s*((?:19\d|20[0-1])\d\s?)[^|{}\s<>]*(?=\s*[|}])/gi, "$1$2 $3 $4")
// remove extraneous bracket //from Batty
Line 520 ⟶ 518:
editor
// ISO dates within single citation
// .ohc_regex(/(\|\s*(?:publication|)-?date\s*=\s*)@YYYY[-–]@MM[-–]@DD(?=\W\D)/gi, "$1@Day @Month @YYYY");
}
Line 527 ⟶ 525:
editor
// ISO dates within single citation
// .ohc_regex(/(\|\s*(?:publication|)-?date\s*=\s*)@YYYY[-–]@MM[-–]@DD(?=\W\D)/gi, "$1@Month @Day, @YYYY");
}
Line 928 ⟶ 926:
.replace(/(\[(?:https?:|ftp:))([^\]]*)(\])/gi, protect_function)
.replace(/(>[ ]*(?:https?:|ftp:))([^< >\]]*)([ ]*<)/gi, protect_function)
.replace(/(\|\s*archive-?url\s*=\s*https?:|ftp:)([^\s\|]*)(\s?\|)/gi, protect_function) //repurposed unused line to protect archive url links (archive.today)
.replace(/(<blockquote>)([\s\S]*?)(<\/blockquote>)/gi, protect_function)
.replace(/(<noinclude>)([\s\S]*?)(<\/noinclude>)/gi, protect_function)
|