jenkins-bot has submitted this change and it was merged.
Change subject: template.py: fix failed substitution in tag
..
template.py: fix failed substitution in tag
Bug: T151931
Change-Id: If8daaecb3ce343a0369c6f0ed60432126ed9abe0
---
M scripts/template.py
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/template.py b/scripts/template.py
index c4bbc6c..66f3e95 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -17,7 +17,9 @@
-subst Resolves the template by putting its text directly into the
article. This is done by changing {{...}} or {{msg:...}} into
- {{subst:...}}
+ {{subst:...}}.
+ Substitution is not available inside ...,
+ ... and ... tags.
-assubst Replaces the first argument as old template with the second
argument as new template but substitutes it like -subst does.
@@ -221,11 +223,11 @@
if self.getOption('subst') and self.getOption('remove'):
replacements.append((templateRegex,
r'{{subst:%s\g}}' % new))
-exceptions['inside-tags'] = ['ref', 'gallery']
+exceptions['inside-tags'] = ['ref', 'gallery', 'poem']
elif self.getOption('subst'):
replacements.append((templateRegex,
r'{{subst:%s\g}}' % old))
-exceptions['inside-tags'] = ['ref', 'gallery']
+exceptions['inside-tags'] = ['ref', 'gallery', 'poem']
elif self.getOption('remove'):
replacements.append((templateRegex, ''))
else:
--
To view, visit https://gerrit.wikimedia.org/r/324267
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If8daaecb3ce343a0369c6f0ed60432126ed9abe0
Gerrit-PatchSet: 6
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa
Gerrit-Reviewer: Dalba
Gerrit-Reviewer: John Vandenberg
Gerrit-Reviewer: Magul
Gerrit-Reviewer: Mpaa
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits