User:AnomieBOT/source/tasks/AccidentalLangLinkFixer.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: AccidentalLangLinkFixer, AltLinkTemplateSubster, ShowByDateSubster, TalkTemplateMover: * Move to runner 3. CFDClerk, DatedCategoryCreator, PeerReviewArchiver, POTDPageCreator: * Move to runner 2.
AnomieBOT (talk | contribs)
Updating published sources: CFDClerk: * Someone made a module to parse Wikipedia:Categories for discussion/Old unclosed discussions and produce Wikipedia:Categories for discussion/Awaiting closure, so stop editing the latter. AccidentalLangLinkFixer: * Fix category name in the task description.
 
(2 intermediate revisions by the same user not shown)
Line 14:
 
Periodically checks pages in [[:Category:Pages automatically checked for
accidental languageincorrect links]] for categories and language links seemingly in
running text, and adds the necessary ":" to make them wikilinks instead.
 
Line 77:
generator => 'categorymembers',
gcmtitle => [ @categories ],
gcmlimit => 500100,
prop => 'langlinks|categories',
lllimit => 'max',
Line 118:
 
# Fix any bad links
my $intxt=$tok->{'revisions'}[0]{'slots'}{'main'}{'*'};
my ($outtxt,$nowiki)=$api->strip_regex(qr/^(?:\s|<!--.*?-->|<\/?(?:noinclude|includeonly|onlyinclude)>)*\[\[\s*(?:$llre|$clre)\s*:[^]]*\]\](?:\s|<!--.*?-->|<\/?(?:noinclude|includeonly|onlyinclude)>)*$/m, $intxt);
($outtxt,$nowiki)=$api->strip_regex(qr/\[\[\s*(?:$clre)\s*:\s*(?:\|[^]]*)?\]\]/, $outtxt, $nowiki);