From 19be04fd6673ad62fb0bbb75160b68247aef48a6 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Tue, 22 Apr 2025 15:38:17 -0400 Subject: [PATCH] Enable multiline mode when compiling regex, because I read the whole file at once, rather than lline-by-line --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index dc581d9..d27c6ea 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)) + re := regex.MustCompile(item.Key.(string), regex.RE_MULTILINE) clr, err := newColor(item.Value.(string)) if err != nil { return *stack.NewStack[regColor](0), err