From 62e59837c6bb4ecfa2e91d64650d60fcfcb827ea Mon Sep 17 00:00:00 2001 From: hudahai Date: Sat, 4 Feb 2023 17:33:47 +0800 Subject: [PATCH] fix: loop reset nextStart --- core/stringx/replacer.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/stringx/replacer.go b/core/stringx/replacer.go index 1a7a5398..3edcf9c2 100644 --- a/core/stringx/replacer.go +++ b/core/stringx/replacer.go @@ -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:]