Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-10-04 00:20:04 +01:00
parent 665ef94ca9
commit a3202aaff3
17 changed files with 63 additions and 56 deletions

9
internal/ansi/ansi.go Normal file
View file

@ -0,0 +1,9 @@
package ansi
import "regexp"
var ansiRegex = regexp.MustCompile(`\x1b\[[0-9;]*m`)
func StripANSI(s string) string {
return ansiRegex.ReplaceAllString(s, "")
}