We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64e5960 commit 7743a77Copy full SHA for 7743a77
1 file changed
src/lib/components/chat/Messages/CodeBlock.svelte
@@ -561,8 +561,10 @@
561
result) &&
562
'border-bottom-left-radius: 0px; border-bottom-right-radius: 0px;'}"><code
563
class="language-{lang} rounded-t-none whitespace-pre text-sm"
564
- >{@html hljs.highlightAuto(code, hljs.getLanguage(lang)?.aliases).value ||
565
- code}</code
+ >{@html (hljs.getLanguage(lang)
+ ? hljs.highlight(code, { language: lang, ignoreIllegals: true })
566
+ : hljs.highlightAuto(code)
567
+ ).value || code}</code
568
></pre>
569
{/if}
570
{:else}
0 commit comments