From 097e90f1de93ae7e92f69e11a7cf36b031f4c0a2 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 6 Oct 2024 00:30:50 -0700 Subject: [PATCH] refac --- src/lib/components/chat/Messages/CodeBlock.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/components/chat/Messages/CodeBlock.svelte b/src/lib/components/chat/Messages/CodeBlock.svelte index d0dcc8973..8b699cf1a 100644 --- a/src/lib/components/chat/Messages/CodeBlock.svelte +++ b/src/lib/components/chat/Messages/CodeBlock.svelte @@ -276,6 +276,10 @@ __builtins__.input = input`); onMount(async () => { console.log('codeblock', lang, code); + + if (lang) { + dispatch('code', { lang }); + } if (document.documentElement.classList.contains('dark')) { mermaid.initialize({ startOnLoad: true,