fix: loop reset nextStart

This commit is contained in:
hudahai
2023-02-04 17:33:47 +08:00
committed by Kevin Wan
parent 981d7dab13
commit 62e59837c6

View File

@@ -40,6 +40,7 @@ func (r *replacer) Replace(text string) string {
replaced := r.mapping[string(target[:used])]
target = append([]rune(replaced), target[used:]...)
cur = r.node
nextStart = 0
} else {
buf.WriteString(string(target[:used]))
target = target[used:]