Revision: 5865 Author: russblau Date: 2008-08-29 17:34:01 +0000 (Fri, 29 Aug 2008)
Log Message: ----------- tweak redirRegex
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-08-29 15:58:18 UTC (rev 5864) +++ trunk/pywikipedia/wikipedia.py 2008-08-29 17:34:01 UTC (rev 5865) @@ -5452,11 +5452,11 @@
if self.versionnumber() > 12: # in MW 1.13 (at least) a redirect directive can follow whitespace - prefix = r'[\n ]*' + prefix = r'\s*' else: - prefix = r'\n*' + prefix = r'[\r\n]*' return re.compile(prefix + '#' + redirKeywordsR - + '.*?[[(.+?)(?:|.*?)?]]', + + '\s*:?\s*[[(.+?)(?:|.*?)?]]', re.IGNORECASE | re.UNICODE | re.DOTALL)
# The following methods are for convenience, so that you can access
pywikipedia-l@lists.wikimedia.org