XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/241566
Change subject: [FIX] Remove disabled parts when extracting templates ...................................................................... [FIX] Remove disabled parts when extracting templates When extracting the templates and values it should remove disabled parts to avoid that the template or parameter names cannot be found. Bug: T113892 Change-Id: Id9070dc9eb3e267f86f3f6b280889433a36267a5 --- M pywikibot/page.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/66/241566/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index ec7430a..251216f 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -2032,7 +2032,7 @@ # WARNING: may not return all templates used in particularly # intricate cases such as template substitution titles = list(t.title() for t in self.templates()) - templates = textlib.extract_templates_and_params(self.text) + templates = textlib.extract_templates_and_params(self.text, True) # backwards-compatibility: convert the dict returned as the second # element into a list in the format used by old scripts result = [] -- To view, visit https://gerrit.wikimedia.org/r/241566 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9070dc9eb3e267f86f3f6b280889433a36267a5 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise <commodorefabia...@gmx.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits