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

russblau at svn.wikimedia.org russblau at svn.wikimedia.org
Tue Dec 4 23:08:13 UTC 2007


Revision: 4638
Author:   russblau
Date:     2007-12-04 23:08:13 +0000 (Tue, 04 Dec 2007)

Log Message:
-----------
Minor regex fix to prevent example links like [[[[this]]]] from matching on the first left bracket.

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2007-12-04 01:58:58 UTC (rev 4637)
+++ trunk/pywikipedia/wikipedia.py	2007-12-04 23:08:13 UTC (rev 4638)
@@ -205,7 +205,7 @@
          r"<input type='hidden' value=\"(.*?)\" name=\"wpEditToken\"")
 Rwatchlist = re.compile(r"<input tabindex='[\d]+' type='checkbox' "
                         r"name='wpWatchthis' checked='checked'")
-Rlink = re.compile(r'\[\[(?P<title>[^\]\|]*)(\|[^\]]*)?\]\]')
+Rlink = re.compile(r'\[\[(?P<title>[^\]\|\[]*)(\|[^\]]*)?\]\]')
 
 
 class Page(object):





More information about the Pywikipedia-l mailing list