Ladsgroup has uploaded a new change for review.
https://gerrit.wikimedia.org/r/94494
Change subject: Add "category" and "file" as examptions in ReplaceExampt
......................................................................
Add "category" and "file" as examptions in ReplaceExampt
Implmented from compat
Change-Id: I062f21c592a04cbc872cf287a6873410c70ed864
---
M pywikibot/textlib.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/94/94494/1
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index c30b678..c45b025 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -94,6 +94,10 @@
'property': re.compile(r'(?i)\{\{\s*#property:\s*p\d+\s*\}\}'),
# Module invocations (currently only Lua)
'invoke': re.compile(r'(?i)\{\{\s*#invoke:.*?}\}'),
+ # categories
+ 'category': re.compile(ur'\[\[ *(?:%s)\s*:.*?\]\]' %
ur'|'.join(site.namespace(14, all = True))),
+ #files
+ 'file': re.compile(ur'\[\[ *(?:%s)\s*:.*?\]\]' %
ur'|'.join(site.namespace(6, all = True))),
}
--
To view, visit https://gerrit.wikimedia.org/r/94494
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I062f21c592a04cbc872cf287a6873410c70ed864
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits