[Pywikipedia-l] SVN: [4708] trunk/pywikipedia/wikipedia.py

russblau at svn.wikimedia.org russblau at svn.wikimedia.org
Thu Dec 13 14:52:39 UTC 2007


Revision: 4708
Author:   russblau
Date:     2007-12-13 14:52:34 +0000 (Thu, 13 Dec 2007)

Log Message:
-----------
minor change in site.redirectRegex; MW will not match a redirect if there is whitespace after the # character.

Modified Paths:
--------------
    trunk/pywikipedia/wikipedia.py

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2007-12-12 19:44:57 UTC (rev 4707)
+++ trunk/pywikipedia/wikipedia.py	2007-12-13 14:52:34 UTC (rev 4708)
@@ -4523,7 +4523,7 @@
         # A redirect starts with hash (#), followed by a keyword, then
         # arbitrary stuff, then a wikilink. The wikilink may contain
         # a label, although this is not useful.
-        return re.compile(r'# *' + redirKeywordsR +
+        return re.compile(r'#' + redirKeywordsR +
                                    '.*?\[\[(.*?)(?:\|.*?)?\]\]',
                           re.IGNORECASE | re.UNICODE | re.DOTALL)
 





More information about the Pywikipedia-l mailing list