jenkins-bot has submitted this change and it was merged.
Change subject: [FEAT] remove "useless" spaces inside templates for cs-wiki
......................................................................
[FEAT] remove "useless" spaces inside templates for cs-wiki
Bug: T107248
Change-Id: I9232e10076b9a6e29ec9f10e925a5960dccbbfe6
---
M pywikibot/cosmetic_changes.py
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index c21868f..87799e9 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -628,8 +628,9 @@
"""Cleanup multiple or trailing spaces."""
multipleSpacesR = re.compile(' +')
spaceAtLineEndR = re.compile(' $')
- exceptions = ['comment', 'math', 'nowiki', 'pre',
'startspace', 'table',
- 'template']
+ exceptions = ['comment', 'math', 'nowiki', 'pre',
'startspace', 'table']
+ if self.site.sitename != 'wikipedia:cs':
+ exceptions.append('template')
text = textlib.replaceExcept(text, multipleSpacesR, ' ', exceptions)
text = textlib.replaceExcept(text, spaceAtLineEndR, '', exceptions)
return text
--
To view, visit
https://gerrit.wikimedia.org/r/227644
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9232e10076b9a6e29ec9f10e925a5960dccbbfe6
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>