From bd9c46ee348811f5e42f13ff57d835d5f9301df7 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 2 Feb 2017 13:00:41 +0900 Subject: [PATCH] Update ANSI processor to strip ^H along with its preceding character --- src/ansi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansi.go b/src/ansi.go index f550670..3636e02 100644 --- a/src/ansi.go +++ b/src/ansi.go @@ -44,7 +44,7 @@ func init() { */ // The following regular expression will include not all but most of the // frequently used ANSI sequences - ansiRegex = regexp.MustCompile("\x1b[\\[()][0-9;]*[a-zA-Z@]|\x1b.|[\x08\x0e\x0f]") + ansiRegex = regexp.MustCompile("\x1b[\\[()][0-9;]*[a-zA-Z@]|\x1b.|[\x0e\x0f]|.\x08") } func extractColor(str string, state *ansiState, proc func(string, *ansiState) bool) (string, *[]ansiOffset, *ansiState) {