Skip to content

Commit

Permalink
Merge pull request #104 from AndrewChubatiuk/escape-template-symbols-…
Browse files Browse the repository at this point in the history
…in-regex

fixed template symbols in regex
  • Loading branch information
dewey authored Sep 28, 2023
2 parents b51b1ff + e78b16f commit e420858
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ var (
)
tmplStart = getenv("TEMPLATE_START", "{{")
tmplEnd = getenv("TEMPLATE_END", "}}")
reEnvironmentPlaceholders = regexp.MustCompile(fmt.Sprintf("%s.+?%s", tmplStart, tmplEnd))
reEnvironmentPlaceholders = regexp.MustCompile(
fmt.Sprintf(
"%s.+?%s",
regexp.QuoteMeta(tmplStart),
regexp.QuoteMeta(tmplEnd),
),
)
)

func init() {
Expand Down

0 comments on commit e420858

Please sign in to comment.