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:
Darragh Bailey 2018-04-25 15:44:16 +01:00 committed by Sorin Sbarnea
parent 5a1150b65a
commit b92336aa95
No known key found for this signature in database
GPG Key ID: B85725D917D27B8A
1 changed files with 1 additions and 1 deletions

View File

@ -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 }
"""