summaryrefslogtreecommitdiff
path: root/replacer.go
diff options
context:
space:
mode:
Diffstat (limited to 'replacer.go')
-rw-r--r--replacer.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/replacer.go b/replacer.go
index e8a4f9b..d7beeab 100644
--- a/replacer.go
+++ b/replacer.go
@@ -115,12 +115,13 @@ func (r *replacer) ReplaceAll(input, empty string) string {
}
}
if !found {
+ lastWriteCursor = i
continue
}
// advance cursor to end of placeholder
- i = end + 1
- lastWriteCursor = i
+ i = end
+ lastWriteCursor = i + 1
}
// flush any unwritten remainder