jenkins-bot merged this change.
[bugfix] Do not removeUselessSpaces inside source/syntaxhighlight tags
Bug: T250469
Change-Id: I86f6fc9794666e38674ed6d155166fc7bead2128
---
M pywikibot/cosmetic_changes.py
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index ae993b9..7aad15e 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -682,7 +682,7 @@
def removeUselessSpaces(self, text):
"""Cleanup multiple or trailing spaces."""
exceptions = ['comment', 'math', 'nowiki', 'pre', 'startspace',
- 'table']
+ 'source', 'table']
if self.site.sitename != 'wikipedia:cs':
exceptions.append('template')
text = textlib.replaceExcept(text, r'(?m)[\t ]+( |$)', r'\1',
To view, visit change 589558. To unsubscribe, or for help writing mail filters, visit settings.