Allow dashes in variable key names
It can be confusing when adding variables to templates and macros to discover that '-' are not valid characters in the key name. Change-Id: I8b10371ddac54c19a92a9d0811cd549a492b3dbb
This commit is contained in:
parent
5a1150b65a
commit
b92336aa95
|
@ -84,7 +84,7 @@ class CustomFormatter(Formatter):
|
|||
_expr = """
|
||||
(?<!{){({{)* # non-pair opening {
|
||||
(?:obj:)? # obj:
|
||||
(?P<key>\w+) # key
|
||||
(?P<key>[\w\-]+) # key
|
||||
(?:\|(?P<default>[^}]*))? # default fallback
|
||||
}(}})*(?!}) # non-pair closing }
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue