diff --git a/features/messages/src/main/java/io/element/android/x/features/messages/components/html/HtmlDocument.kt b/features/messages/src/main/java/io/element/android/x/features/messages/components/html/HtmlDocument.kt index 8c28c32891..e04e8dcbc0 100644 --- a/features/messages/src/main/java/io/element/android/x/features/messages/components/html/HtmlDocument.kt +++ b/features/messages/src/main/java/io/element/android/x/features/messages/components/html/HtmlDocument.kt @@ -87,7 +87,11 @@ private fun HtmlPreformatted(pre: Element, modifier: Modifier = Modifier) { val isCode = pre.firstElementChild()?.normalName() == "code" val backgroundColor = if (isCode) MaterialTheme.colorScheme.codeBackground() else Color.Unspecified - Box(modifier.background(color = backgroundColor)) { + Box( + modifier + .background(color = backgroundColor) + .padding(horizontal = 8.dp) + ) { Text( text = pre.wholeText(), style = TextStyle(fontFamily = FontFamily.Monospace),