diff --git a/compose/src/commonMain/kotlin/warlockfe/warlock3/compose/util/AnnotatedStringHelpers.kt b/compose/src/commonMain/kotlin/warlockfe/warlock3/compose/util/AnnotatedStringHelpers.kt index aaa21e0..3b1c74a 100644 --- a/compose/src/commonMain/kotlin/warlockfe/warlock3/compose/util/AnnotatedStringHelpers.kt +++ b/compose/src/commonMain/kotlin/warlockfe/warlock3/compose/util/AnnotatedStringHelpers.kt @@ -8,7 +8,7 @@ fun AnnotatedString.highlight(highlights: List): AnnotatedStringH val entireLineStyles = mutableListOf() val text = with(AnnotatedString.Builder(this)) { highlights.forEach { highlight -> - highlight.regex.find(text)?.let { result -> + highlight.regex.findAll(text).forEach { result -> for ((index, group) in result.groups.withIndex()) { if (group != null) { highlight.styles[index]?.let { style ->