http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9277
Revision: 9277 Author: xqt Date: 2011-05-29 09:32:20 +0000 (Sun, 29 May 2011) Log Message: ----------- update from trunk r9217
Modified Paths: -------------- branches/rewrite/pywikibot/textlib.py
Modified: branches/rewrite/pywikibot/textlib.py =================================================================== --- branches/rewrite/pywikibot/textlib.py 2011-05-29 09:11:40 UTC (rev 9276) +++ branches/rewrite/pywikibot/textlib.py 2011-05-29 09:32:20 UTC (rev 9277) @@ -332,7 +332,7 @@ # This regular expression will find every interwiki link, plus trailing # whitespace. languages = '|'.join(site.validLanguageLinks() + site.family.obsolete.keys()) - interwikiR = re.compile(r'[[(%s)\s?:[^]]*]][\s]*' + interwikiR = re.compile(r'[[(%s)\s?:[^[]\n]*]][\s]*' % languages, re.IGNORECASE) text = replaceExcept(text, interwikiR, '', ['nowiki', 'comment', 'math', 'pre', 'source'],
pywikipedia-svn@lists.wikimedia.org