summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-02-02 13:00:41 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-02-02 13:00:41 +0900
commitbd9c46ee348811f5e42f13ff57d835d5f9301df7 (patch)
treecd9cc563d39969bdc6a36074100143df217da286
parent736aeaa1d3716c02b161ac70b27285f15279359d (diff)
Update ANSI processor to strip ^H along with its preceding character
-rw-r--r--src/ansi.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ansi.go b/src/ansi.go
index f5506701..3636e02c 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) {