mirror of
https://github.com/open-webui/open-webui
synced 2025-03-16 10:28:28 +00:00
refac
This commit is contained in:
parent
4b00036dbf
commit
a7f543d737
@ -271,19 +271,13 @@ __builtins__.input = input`);
|
|||||||
render();
|
render();
|
||||||
}
|
}
|
||||||
|
|
||||||
$: if (lang) {
|
$: dispatch('code', { lang, code });
|
||||||
dispatchCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
const dispatchCode = () => {
|
|
||||||
dispatch('code', { lang, code });
|
|
||||||
};
|
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
console.log('codeblock', lang, code);
|
console.log('codeblock', lang, code);
|
||||||
|
|
||||||
if (lang) {
|
if (lang) {
|
||||||
dispatchCode();
|
dispatch('code', { lang, code });
|
||||||
}
|
}
|
||||||
if (document.documentElement.classList.contains('dark')) {
|
if (document.documentElement.classList.contains('dark')) {
|
||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
|
Loading…
Reference in New Issue
Block a user