jenkins-bot has submitted this change and it was merged.
Change subject: template.py: fix failed substitution in <poem> tag
......................................................................
template.py: fix failed substitution in <poem> 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 <ref>...</ref>,
+ <gallery>...</gallery> and <poem>...</poem> 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<parameters>}}' % new))
- exceptions['inside-tags'] = ['ref', 'gallery']
+ exceptions['inside-tags'] = ['ref', 'gallery',
'poem']
elif self.getOption('subst'):
replacements.append((templateRegex,
r'{{subst:%s\g<parameters>}}' % 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 <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>