diff --git a/packages/presentation/src/components/message/Nodes.svelte b/packages/presentation/src/components/message/Nodes.svelte index 262eef4e2f..d241448958 100644 --- a/packages/presentation/src/components/message/Nodes.svelte +++ b/packages/presentation/src/components/message/Nodes.svelte @@ -75,7 +75,7 @@ {:else if node.nodeName === 'BLOCKQUOTE'}
{:else if node.nodeName === 'CODE'} - +
{:else if node.nodeName === 'PRE'}
{:else if node.nodeName === 'BR'} diff --git a/packages/theme/styles/prose.scss b/packages/theme/styles/prose.scss index bd655b3642..bc4fe50511 100644 --- a/packages/theme/styles/prose.scss +++ b/packages/theme/styles/prose.scss @@ -47,6 +47,8 @@ table.proseTable { } .proseCode { + display: inline-block; + margin: 0; padding: 0 .25rem; font-family: var(--mono-font); color: var(--theme-content-color); @@ -63,11 +65,11 @@ table.proseTable { border-radius: .25rem; padding: .5rem; - code { white-space: normal; } + pre { white-space: pre-wrap; } } // Fixes for MessageViewer -pre.proseCodeBlock > code.proseCode { +pre.proseCodeBlock > pre.proseCode { padding: 0; background-color: transparent; border: none;