http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10788
Revision: 10788 Author: amir Date: 2012-12-12 01:43:05 +0000 (Wed, 12 Dec 2012) Log Message: ----------- fix for bug #3594792
Modified Paths: -------------- trunk/pywikipedia/cosmetic_changes.py
Modified: trunk/pywikipedia/cosmetic_changes.py =================================================================== --- trunk/pywikipedia/cosmetic_changes.py 2012-12-11 22:13:15 UTC (rev 10787) +++ trunk/pywikipedia/cosmetic_changes.py 2012-12-12 01:43:05 UTC (rev 10788) @@ -736,6 +736,8 @@ namespaces = list(self.site.namespace(6, all=True)) pattern = re.compile(u'[[(' + '|'.join(namespaces) + '):.+?.\w+? *(|(([[.*?]])|.)*)?]]', re.UNICODE) + #not to let bot edits in latin content + exceptions.append(re.compile(u"[A-Za-z\d]+? *?, *?[A-Za-z\d]+?")) exceptions.append(pattern) text = pywikibot.replaceExcept(text, u',', u'،', exceptions) if self.site.lang=='ckb':
pywikipedia-svn@lists.wikimedia.org