http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11414
Revision: 11414 Author: xqt Date: 2013-04-21 15:58:42 +0000 (Sun, 21 Apr 2013) Log Message: ----------- Templates may contain curling brackets, bugfix for bug #3021792, update from trunk r11413
Modified Paths: -------------- branches/rewrite/pywikibot/textlib.py
Modified: branches/rewrite/pywikibot/textlib.py =================================================================== --- branches/rewrite/pywikibot/textlib.py 2013-04-21 15:45:32 UTC (rev 11413) +++ branches/rewrite/pywikibot/textlib.py 2013-04-21 15:58:42 UTC (rev 11414) @@ -19,7 +19,8 @@ from HTMLParser import HTMLParser import config2 as config
-TEMP_REGEX = re.compile('{{(msg:)?(?P<name>[^{|]+?)(|(?P<params>[^{]+?))?}}') +TEMP_REGEX = re.compile( + '{{(?:msg:)?(?P<name>[^{|]+?)(?:|(?P<params>[^{]+?(?:{[^{]+?}[^{]*?)?))?}}')
def unescape(s): """Replace escaped HTML-special characters by their originals"""
pywikipedia-svn@lists.wikimedia.org