浏览代码

fix: code block

Timothy J. Baek 10 月之前
父节点
当前提交
24ef5af2a1
共有 1 个文件被更改,包括 2 次插入1 次删除
  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