From c48c233ec782da8dadabe9e81f8c480af2fa6d6d Mon Sep 17 00:00:00 2001 From: Gerardo Date: Mon, 22 Jan 2024 19:27:35 +0100 Subject: [PATCH] Fix getTextColor in MarkSpan --- aztec/src/main/kotlin/org/wordpress/aztec/spans/MarkSpan.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/spans/MarkSpan.kt b/aztec/src/main/kotlin/org/wordpress/aztec/spans/MarkSpan.kt index 1b127c8cc..a75221286 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/spans/MarkSpan.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/spans/MarkSpan.kt @@ -34,6 +34,7 @@ class MarkSpan : CharacterStyle, IAztecInlineSpan { } fun getTextColor(): String { - return java.lang.String.format("#%06X", 0xFFFFFF and textColor!!) + val currentColor = textColor ?: 0 + return String.format("#%06X", 0xFFFFFF and currentColor) } }