Browse Source

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
tags/2.2.0
Darragh Bailey 1 year ago
parent
commit
b92336aa95
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      jenkins_jobs/formatter.py

+ 1
- 1
jenkins_jobs/formatter.py View File

@@ -84,7 +84,7 @@ class CustomFormatter(Formatter):
84 84
     _expr = """
85 85
         (?<!{){({{)*                # non-pair opening {
86 86
         (?:obj:)?                   # obj:
87
-        (?P<key>\w+)                # key
87
+        (?P<key>[\w\-]+)            # key
88 88
         (?:\|(?P<default>[^}]*))?   # default fallback
89 89
         }(}})*(?!})                 # non-pair closing }
90 90
     """

Loading…
Cancel
Save