aboutsummaryrefslogtreecommitdiff
path: root/src/RichContent/RichString.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/RichContent/RichString.kt')
-rw-r--r--src/RichContent/RichString.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/RichContent/RichString.kt b/src/RichContent/RichString.kt
index f09e4715..2110c47f 100644
--- a/src/RichContent/RichString.kt
+++ b/src/RichContent/RichString.kt
@@ -5,7 +5,8 @@ public class RichString {
public val slices: List<RichStringSlice> get() = sliceList
public fun addSlice(slice: RichStringSlice) {
- sliceList.add(slice)
+ if (slice.text.length() > 0)
+ sliceList.add(slice)
}
public fun addSlice(text: String, style: RichStringStyle) {