Html rendering: add padding to code blocks
This commit is contained in:
parent
fcda104f84
commit
45cf334d6e
1 changed files with 5 additions and 1 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue