http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10634
Revision: 10634 Author: xqt Date: 2012-10-31 16:58:50 +0000 (Wed, 31 Oct 2012) Log Message: ----------- revert r8307 due to bug #3582204
Modified Paths: -------------- trunk/pywikipedia/pywikibot/textlib.py
Modified: trunk/pywikipedia/pywikibot/textlib.py =================================================================== --- trunk/pywikipedia/pywikibot/textlib.py 2012-10-31 16:57:22 UTC (rev 10633) +++ trunk/pywikipedia/pywikibot/textlib.py 2012-10-31 16:58:50 UTC (rev 10634) @@ -81,7 +81,7 @@ # templates cascaded up to level 2, but no deeper. For arbitrary # depth, we'd need recursion which can't be done in Python's re. # After all, the language of correct parenthesis words is not regular. - 'template': re.compile(r'(?s){{(({{.*?}})|.)*}}'), + 'template': re.compile(r'(?s){{(({{.*?}})?.*?)*}}'), 'hyperlink': compileLinkR(), 'gallery': re.compile(r'(?is)<gallery.*?>.*?</gallery>'), # this matches internal wikilinks, but also interwiki, categories, and