Skip to content
Myr

Update ANSI processor to strip ^H along with its preceding character

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 736aeaa · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/ansi.go+1 added-1 removed
42 unmodified lines
43 - http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x405.html44 */45 // The following regular expression will include not all but most of the46 // frequently used ANSI sequences47 ansiRegex = regexp.MustCompile("\x1b[\\[()][0-9;]*[a-zA-Z@]|\x1b.|[\x08\x0e\x0f]")47 ansiRegex = regexp.MustCompile("\x1b[\\[()][0-9;]*[a-zA-Z@]|\x1b.|[\x0e\x0f]|.\x08")48}4950func extractColor(str string, state *ansiState, proc func(string, *ansiState) bool) (string, *[]ansiOffset, *ansiState) {51 var offsets []ansiOffset
147 unmodified lines