Make wmliterator a bit more picky about matching tags,

...so it won't choke on formula-AI pth declrations.
This commit is contained in:
Eric S. Raymond 2009-03-18 07:29:34 +00:00
parent 4d12d700f2
commit 7b276c2db2

View file

@ -23,7 +23,7 @@ Limitations:
import sys, re, copy
keyPattern = re.compile('(\w+)(,\s?\w+)*\s*=')
keySplit = re.compile(r'[=,\s]')
tagPattern = re.compile(r'(^|(?<![\w\|\}]))(\[.*?\])')
tagPattern = re.compile(r'(^|(?<![\w\|\}]))(\[/?\+?[a-z].*?\])')
macroOpenPattern = re.compile(r'(\{[^\s\}\{]*)')
macroClosePattern = re.compile(r'\}')
closeMacroType = 'end of macro'