http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9169
Revision: 9169 Author: xqt Date: 2011-04-13 04:38:23 +0000 (Wed, 13 Apr 2011) Log Message: ----------- Do not putSpacesInLists inside template namespaces like http://hsb.wikipedia.org/w/index.php?title=P%C5%99ed%C5%82oha%3AInfoka%C5%A1...
Modified Paths: -------------- trunk/pywikipedia/cosmetic_changes.py
Modified: trunk/pywikipedia/cosmetic_changes.py =================================================================== --- trunk/pywikipedia/cosmetic_changes.py 2011-04-12 23:08:51 UTC (rev 9168) +++ trunk/pywikipedia/cosmetic_changes.py 2011-04-13 04:38:23 UTC (rev 9169) @@ -637,13 +637,17 @@ For better readability of bullet list and enumeration wiki source code, puts a space between the * or # and the text.
- NOTE: This space is recommended in the syntax help on the English, German, - and French Wikipedia. It might be that it is not wanted on other wikis. - If there are any complaints, please file a bug report. + NOTE: This space is recommended in the syntax help on the English, + German, and French Wikipedia. It might be that it is not wanted on other + wikis. If there are any complaints, please file a bug report. """ exceptions = ['comment', 'math', 'nowiki', 'pre', 'source', 'timeline'] - if not self.redirect and pywikibot.calledModuleName() <> 'capitalize_redirects': - text = pywikibot.replaceExcept(text, r'(?m)^(?P<bullet>[:;]*(*+|#+)[:;*#]*)(?P<char>[^\s*#:;].+?)', '\g<bullet> \g<char>', exceptions) + if not (self.redirect or self.template) and \ + pywikibot.calledModuleName() != 'capitalize_redirects': + text = pywikibot.replaceExcept( + text, + r'(?m)^(?P<bullet>[:;]*(*+|#+)[:;*#]*)(?P<char>[^\s*#:;].+?)', '\g<bullet> \g<char>', + exceptions) return text
def replaceDeprecatedTemplates(self, text):
pywikipedia-svn@lists.wikimedia.org