From 06fab2292c740059316205818d8cf4d000fd1ac0 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Tue, 22 Apr 2025 15:55:30 -0400 Subject: [PATCH] Enable RE_SINGLE_LINE flag when compiling regex, to allow newline to be treated like any other character --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index d27c6ea..19bf956 100644 --- a/config.go +++ b/config.go @@ -88,7 +88,7 @@ func loadConfig(configFilename string) (stack.Stack[regColor], error) { // returned. regColorStack := stack.NewStack[regColor](len(strings.Split(string(configFile), "\n"))) // The stack will have the same size as the number of lines in the file for _, item := range tempMapSlice { - re := regex.MustCompile(item.Key.(string), regex.RE_MULTILINE) + re := regex.MustCompile(item.Key.(string), regex.RE_MULTILINE, regex.RE_SINGLE_LINE) clr, err := newColor(item.Value.(string)) if err != nil { return *stack.NewStack[regColor](0), err