Browse Source

fix: code block

Timothy J. Baek 10 months ago
parent
commit
24ef5af2a1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib/components/chat/Messages/CodeBlock.svelte

+ 2 - 1
src/lib/components/chat/Messages/CodeBlock.svelte

@@ -250,7 +250,8 @@ __builtins__.input = input`);
 			stderr ||
 			result) &&
 			'border-bottom-left-radius: 0px; border-bottom-right-radius: 0px;'}"><code
-			class="language-{lang} rounded-t-none whitespace-pre">{@html highlightedCode || code}</code
+			class="language-{lang} rounded-t-none whitespace-pre"
+			>{#if highlightedCode}{@html highlightedCode}{:else}{code}{/if}</code
 		></pre>
 
 	<div