http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10633
Revision: 10633 Author: xqt Date: 2012-10-31 16:57:22 +0000 (Wed, 31 Oct 2012) Log Message: ----------- revert r8307 due to bug #3582204
Modified Paths: -------------- branches/rewrite/pywikibot/textlib.py
Modified: branches/rewrite/pywikibot/textlib.py =================================================================== --- branches/rewrite/pywikibot/textlib.py 2012-10-31 11:39:46 UTC (rev 10632) +++ branches/rewrite/pywikibot/textlib.py 2012-10-31 16:57:22 UTC (rev 10633) @@ -83,7 +83,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