This commit is contained in:
Timothy J. Baek 2024-10-06 13:00:53 -07:00
parent 4b00036dbf
commit a7f543d737

View File

@ -271,19 +271,13 @@ __builtins__.input = input`);
render();
}
$: if (lang) {
dispatchCode();
}
const dispatchCode = () => {
dispatch('code', { lang, code });
};
$: dispatch('code', { lang, code });
onMount(async () => {
console.log('codeblock', lang, code);
if (lang) {
dispatchCode();
dispatch('code', { lang, code });
}
if (document.documentElement.classList.contains('dark')) {
mermaid.initialize({