[Pywikipedia-l] SVN: [4623] trunk/pywikipedia/wikipedia.py
rotem at svn.wikimedia.org
rotem at svn.wikimedia.org
Sat Dec 1 10:17:01 UTC 2007
Revision: 4623
Author: rotem
Date: 2007-12-01 10:17:01 +0000 (Sat, 01 Dec 2007)
Log Message:
-----------
(bug 1841155) replaceImage removes templates curly brackets.
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2007-12-01 10:03:41 UTC (rev 4622)
+++ trunk/pywikipedia/wikipedia.py 2007-12-01 10:17:01 UTC (rev 4623)
@@ -2187,7 +2187,7 @@
fileReferenceR = re.compile(u'%s(?P<filename>(?:%s)?)' % (namespacePattern, imagePattern))
def template_replacer(match):
- return fileReferenceR.sub(filename_replacer, match.group('contents'))
+ return fileReferenceR.sub(filename_replacer, match.group(0))
new_text = templateR.sub(template_replacer, new_text)
if put:
More information about the Pywikipedia-l
mailing list