Skip to content

Commit 7ba5034

Browse files
qu1queeeHeavyWombat
authored andcommitted
Use strings.Replace() with -1 for all occurrences
1 parent 919af6c commit 7ba5034

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func ParseString(input string, opts ...ParseOption) (*String, error) {
6262

6363
// Special case: the escape sequence without any parameter is equivalent to
6464
// the reset escape sequence.
65-
input = strings.ReplaceAll(input, "\x1b[m", "\x1b[0m")
65+
input = strings.Replace(input, "\x1b[m", "\x1b[0m", -1)
6666

6767
for _, submatch := range escapeSeqRegExp.FindAllStringSubmatchIndex(input, -1) {
6868
fullMatchStart, fullMatchEnd := submatch[0], submatch[1]

0 commit comments

Comments
 (0)