Skip to content

Commit 5ab790e

Browse files
authored
Update regex in TransformTemplateKeys function
Fix regex pattern to correctly capture template keys.
1 parent da31c90 commit 5ab790e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/templating/templating.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func AddTemplateFunc(tmplStr string, funcName string) (string, error) {
4444
}
4545

4646
func TransformTemplateKeys(tmplStr string, prefix string, transform func(varRegex *regexp.Regexp, m string) string) (string, error) {
47-
re, err := regexp.Compile(`{{[^{}]+}}`)
47+
re, err := regexp.Compile(`{{([^{}]+)}}`)
4848

4949
if err != nil {
5050
return tmplStr, err

0 commit comments

Comments
 (0)