fix(suite): Add hyphen support for context keys (#1277)

This commit is contained in:
TwiN authored and GitHub committed 2025-09-19 12:09:18 -04:00
1 parent 3a95e32210
commit 1658825525
3 files changed
+139 -5

No files matched your search

+1 -1
View File
@@ -391,7 +391,7 @@ func replaceContextPlaceholders(input string, ctx *gontext.Gontext) (string, err
return input, nil
}
var contextErrors []string
contextRegex := regexp.MustCompile(`\[CONTEXT\]\.[\w\.]+`)
contextRegex := regexp.MustCompile(`\[CONTEXT\]\.[\w\.\-]+`)
result := contextRegex.ReplaceAllStringFunc(input, func(match string) string {
// Extract the path after [CONTEXT].
path := strings.TrimPrefix(match, "[CONTEXT].")