Don't allow dollar_var to swalllow characters like "{"

This commit is contained in:
Peter Eckersley 2016-07-09 15:13:09 -07:00
parent be8f0bc53b
commit 68500cd436

View file

@ -23,7 +23,7 @@ class RawNginxParser(object):
right_bracket = space.leaveWhitespace() + Literal("}").suppress()
semicolon = Literal(";").suppress()
key = Word(alphanums + "_/+-.")
dollar_var = Combine(Literal('$') + nonspace)
dollar_var = Combine(Literal('$') + Regex(r"[^\{\};,\s]+"))
condition = Regex(r"\(.+\)")
# Matches anything that is not a special character AND any chars in single
# or double quotes