Timothy J. Baek 7 месяцев назад
Родитель
Сommit
097e90f1de
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      src/lib/components/chat/Messages/CodeBlock.svelte

+ 4 - 0
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,