Matěj Suchánek has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/318349

Change subject: Fix self interwikis beginning with colon, too
......................................................................

Fix self interwikis beginning with colon, too

Change-Id: I212e953cf08ea822b0d5777d221028ad83da9f30
---
M pywikibot/cosmetic_changes.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/49/318349/2

diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index 645b5e0..c348539 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -288,7 +288,7 @@
         Remove their language code prefix.
         """
         if not self.talkpage and pywikibot.calledModuleName() != 'interwiki':
-            interwikiR = re.compile(r'\[\[%s\s?:([^\[\]\n]*)\]\]'
+            interwikiR = re.compile(r'\[\[(?:\s?:)?\s?%s\s?:([^\[\]\n]*)\]\]'
                                     % self.site.code)
             text = interwikiR.sub(r'[[\1]]', text)
         return text

-- 
To view, visit https://gerrit.wikimedia.org/r/318349
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I212e953cf08ea822b0d5777d221028ad83da9f30
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to