[MediaWiki-commits] [Gerrit] pywikibot/core[master]: template.py: fix failed substitution in tag

2016-12-03 Thread jenkins-bot (Code Review)
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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: template.py: fix failed substitution in tag

2016-11-29 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review.

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

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, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/67/324267/1

diff --git a/scripts/template.py b/scripts/template.py
index c4bbc6c..470dc69 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -221,11 +221,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: newchange
Gerrit-Change-Id: If8daaecb3ce343a0369c6f0ed60432126ed9abe0
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits