Skip to content

Commit

Permalink
Merge pull request #4 from jr200/feature/configurable-delimeters
Browse files Browse the repository at this point in the history
bug-fix: missed regex when parsing delimiters
  • Loading branch information
jr200 authored Aug 24, 2024
2 parents e6c7198 + 331913a commit ffed972
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/server/template_fns.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ func strJoin(input []interface{}, separators ...string) string {
}

func renderAllTemplates(content string, mappings map[string]interface{}, params ConfigParams) string {
re := regexp.MustCompile(`{{.*?}}`)
pattern := fmt.Sprintf(`%s.*?%s`, regexp.QuoteMeta(params.LeftDelim), regexp.QuoteMeta(params.RightDelim))
re := regexp.MustCompile(pattern)

matches := re.FindAllStringIndex(content, -1)

Expand Down

0 comments on commit ffed972

Please sign in to comment.