Enable RE_SINGLE_LINE flag when compiling regex, to allow newline to be treated like any other character

This commit is contained in:
2025-04-22 15:55:30 -04:00
parent 19be04fd66
commit 06fab2292c

View File

@@ -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