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

misza13 at svn.wikimedia.org misza13 at svn.wikimedia.org
Tue May 27 17:08:54 UTC 2008


Revision: 5441
Author:   misza13
Date:     2008-05-27 17:08:54 +0000 (Tue, 27 May 2008)

Log Message:
-----------
Surprise! Leading newlines don't break redirects. (Someone should prob. check for other whitespace chars...)

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2008-05-26 20:00:22 UTC (rev 5440)
+++ trunk/pywikipedia/wikipedia.py	2008-05-27 17:08:54 UTC (rev 5441)
@@ -5147,7 +5147,7 @@
         # arbitrary stuff, then a wikilink. The wikilink may contain
         # a label, although this is not useful.
 
-        return re.compile(r'#' + redirKeywordsR +
+        return re.compile('\n*#' + redirKeywordsR +
                                    '.*?\[\[(.+?)(?:\|.*?)?\]\]',
                           re.IGNORECASE | re.UNICODE | re.DOTALL)
 





More information about the Pywikipedia-l mailing list