Skip to content
Myr

fix: spelling `Refence` -> `Reference`

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

authored by Hiroki Konishi · committed by Junegunn Choi · parent f4f47f5 · Browse files · 1 file+3 added−3 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+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:src/ansi_test.go+3 added-3 removed
18 unmodified lines
19// - http://ascii-table.com/ansi-escape-sequences.php20// - http://ascii-table.com/ansi-escape-sequences-vt-100.php21// - http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x405.html22// - https://invisible-island.net/xterm/ctlseqs/ctlseqs.html23var ansiRegexRefence = regexp.MustCompile("(?:\x1b[\\[()][0-9;]*[a-zA-Z@]|\x1b][0-9];[[:print:]]+(?:\x1b\\\\|\x07)|\x1b.|[\x0e\x0f]|.\x08)")23var ansiRegexReference = regexp.MustCompile("(?:\x1b[\\[()][0-9;]*[a-zA-Z@]|\x1b][0-9];[[:print:]]+(?:\x1b\\\\|\x07)|\x1b.|[\x0e\x0f]|.\x08)")2425func testParserReference(t testing.TB, str string) {26 t.Helper()27
6 unmodified lines
3435 s := str36 for i := 0; ; i++ {37 got := toSlice(nextAnsiEscapeSequence(s))38 exp := ansiRegexRefence.FindStringIndex(s)38 exp := ansiRegexReference.FindStringIndex(s)3940 equal := len(got) == len(exp)41 if equal {42 for i := 0; i < len(got); i++ {
364 unmodified lines
407 b.SetBytes(int64(len(ansiBenchmarkString)))408 for i := 0; i < b.N; i++ {409 s := ansiBenchmarkString410 for {411 a := ansiRegexRefence.FindStringIndex(s)411 a := ansiRegexReference.FindStringIndex(s)412 if len(a) == 0 {413 break414 }415 s = s[a[1]:]
10 unmodified lines