From b0432b848dccb7ab6e91f6c6a46ed610728acc7e Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 21 Jul 2025 23:48:28 +0530 Subject: [PATCH] fix: manually patch HTML entities Fixes #904 --- common/src/main/kotlin/dev/msfjarvis/claw/common/ui/HTML.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/kotlin/dev/msfjarvis/claw/common/ui/HTML.kt b/common/src/main/kotlin/dev/msfjarvis/claw/common/ui/HTML.kt index 87366dd8..13177360 100644 --- a/common/src/main/kotlin/dev/msfjarvis/claw/common/ui/HTML.kt +++ b/common/src/main/kotlin/dev/msfjarvis/claw/common/ui/HTML.kt @@ -122,7 +122,9 @@ internal fun ThemedRichText(text: String, modifier: Modifier = Modifier) { textDecoration = TextDecoration.Underline, ) - val segments = parseSegments(text) + // Manually replace the HTML encoded angle brackets as a terrible hack that avoids code blocks + // looking terrible. + val segments = parseSegments(text.replace("<", "<").replace(">", ">")) Column(modifier = modifier) { for (segment in segments) {