Revision: 3933
Author: wikipedian
Date: 2007-08-01 16:37:37 +0000 (Wed, 01 Aug 2007)
Log Message:
-----------
fixed handling of URLs in multi-line templates, e.g. the infobox in
http://de.wikipedia.org/wiki/Camon_%28Ari%C3%A8ge%29
Modified Paths:
--------------
trunk/pywikipedia/weblinkchecker.py
Modified: trunk/pywikipedia/weblinkchecker.py
===================================================================
--- trunk/pywikipedia/weblinkchecker.py 2007-08-01 16:24:02 UTC (rev 3932)
+++ trunk/pywikipedia/weblinkchecker.py 2007-08-01 16:37:37 UTC (rev 3933)
@@ -107,7 +107,7 @@
# might be a | or a } directly after a URL which does not belong to
# the URL itself.
# Blow up templates with spaces to avoid these problems.
- templateWithParamsR = re.compile(r'{{(.*?[^ ])\|([^ ].*?)}}')
+ templateWithParamsR = re.compile(r'{{(.*?[^ ])\|([^ ].*?)}}', re.DOTALL)
while templateWithParamsR.search(text):
text = templateWithParamsR.sub(r'{{ \1 | \2 }}', text)