diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 43bc9536..5b947183 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -385,7 +385,6 @@ } renderLatex(); - hljs.highlightAll(); createCopyCodeBlockButton(); } @@ -546,6 +545,12 @@ history.currentId = messageId; } } + + await tick(); + + renderLatex(); + hljs.highlightAll(); + createCopyCodeBlockButton(); }; const showNextMessage = async (message) => { @@ -586,6 +591,12 @@ history.currentId = messageId; } } + + await tick(); + + renderLatex(); + hljs.highlightAll(); + createCopyCodeBlockButton(); }; //////////////////////////