Added \| to the rest regex for nested inlinefuncs. Resolves #989.

This commit is contained in:
Griatch 2016-06-24 18:38:23 +02:00
parent 03ef093d36
commit 418395bd01

View file

@ -195,10 +195,10 @@ _RE_TOKEN = re.compile(r"""
(?<!\\)\'\'\'(?P<singlequote>.*?)(?<!\\)\'\'\'| # unescaped single-triples (escapes all inside them)
(?<!\\)\"\"\"(?P<doublequote>.*?)(?<!\\)\"\"\"| # unescaped normal triple quotes (escapes all inside them)
(?P<comma>(?<!\\)\,)| # unescaped , (argument separator)
(?P<end>(?<!\\)\))| # unescaped } (end of function call)
(?P<start>(?<!\\)\$\w+\()| # unescaped $funcname{ (start of function call)
(?P<end>(?<!\\)\))| # unescaped ) (end of function call)
(?P<start>(?<!\\)\$\w+\()| # unescaped $funcname( (start of function call)
(?P<escaped>\\'|\\"|\\\)|\\$\w+\()| # escaped tokens should re-appear in text
(?P<rest>[\w\s.-\/#!%\^&\*;:=\-_`~\(}{\[\]]+|\"{1}|\'{1}) # everything else should also be included""",
(?P<rest>[\w\s.-\/#!%\^&\*;:=\-_`~\|\(}{\[\]]+|\"{1}|\'{1}) # everything else should also be included""",
re.UNICODE + re.IGNORECASE + re.VERBOSE + re.DOTALL)