diff --git a/src/ansi.go b/src/ansi.go index debba47..56831ee 100644 --- a/src/ansi.go +++ b/src/ansi.go @@ -49,7 +49,7 @@ func extractColor(str string, state *ansiState, proc func(string, *ansiState) bo prev := str[idx:offset[0]] output.WriteString(prev) if proc != nil && !proc(prev, state) { - break + return "", nil, nil } newState := interpretCode(str[offset[0]:offset[1]], state)