Pārlūkot izejas kodu

fix: loop reset nextStart

hudahai 2 gadi atpakaļ
vecāks
revīzija
62e59837c6
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      core/stringx/replacer.go

+ 1 - 0
core/stringx/replacer.go

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