http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9217
Revision: 9217 Author: a_engels Date: 2011-05-07 17:23:24 +0000 (Sat, 07 May 2011) Log Message: ----------- don't remove supposed interwiki which (rightly) are not recognized as such elsewhere
Modified Paths: -------------- trunk/pywikipedia/pywikibot/textlib.py
Modified: trunk/pywikipedia/pywikibot/textlib.py =================================================================== --- trunk/pywikipedia/pywikibot/textlib.py 2011-05-05 21:08:20 UTC (rev 9216) +++ trunk/pywikipedia/pywikibot/textlib.py 2011-05-07 17:23:24 UTC (rev 9217) @@ -355,7 +355,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'],