Page MenuHomePhabricator

template.py: Also remove the whitespace after the removed templates
Closed, ResolvedPublic

Description

For example, when removing {{text}} from

word1
{{text|word2}}
word3

the new revision should be:

word1
word3

instead of the current behaviour which is:

word1

word3

See this diff as an example of current script in action. As you can see, a new empty line is remained after the removal of the template.

Event Timeline

Dalba renamed this task from template.py: Remove the whitespace after the templates when removing them to template.py: Also remove the whitespace after the removed templates.Aug 29 2016, 12:26 AM
Xqt triaged this task as Medium priority.Jan 22 2017, 10:40 AM
Xqt added a project: Pywikibot-textlib.py.

Change 367819 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [IMPR] Handle separate line templates in template.py

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

Change 367819 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Handle separate line templates in template.py

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