Skip to content

Commit

Permalink
fix: replace ALL occurrences of a prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Thatsmusic99 <25277367+thatsmusic99@users.noreply.github.com>
  • Loading branch information
Thatsmusic99 committed Aug 12, 2023
1 parent e3b3595 commit 6ae55d8
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -49,8 +49,7 @@ class PartialComponent private constructor(private var raw: String) {
}

for ((placeholder, prefix) in actualPlaceholders) {
val index = tmp.indexOf(placeholder).takeIf { it != -1 } ?: continue
tmp = tmp.replaceRange(index, index + placeholder.length, prefix)
tmp = tmp.replace(placeholder, prefix)

dirty = true
cache = null
Expand Down

0 comments on commit 6ae55d8

Please sign in to comment.