From aa9f3d06322384400237c2ddba4ea728d710b6e4 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 16 May 2024 23:19:31 -1000 Subject: [PATCH] refac: styling --- src/lib/components/chat/Messages/CodeBlock.svelte | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Messages/CodeBlock.svelte b/src/lib/components/chat/Messages/CodeBlock.svelte index 5d7ae3f8e..bebc482f9 100644 --- a/src/lib/components/chat/Messages/CodeBlock.svelte +++ b/src/lib/components/chat/Messages/CodeBlock.svelte @@ -204,6 +204,12 @@ __builtins__.input = input`); console.log(result); console.log(stdout); console.log(stderr); + + const pltCanvasElement = document.getElementById(`plt-canvas-${id}`); + + if (pltCanvasElement?.innerHTML !== '') { + pltCanvasElement.classList.add('px-4', 'pt-4'); + } } catch (error) { console.error('Error:', error); stderr = error; @@ -302,6 +308,8 @@ __builtins__.input = input`); class="language-{lang} rounded-t-none whitespace-pre">{@html highlightedCode || code} +
+ {#if executing}
STDOUT/STDERR
@@ -313,7 +321,5 @@ __builtins__.input = input`);
{stdout || stderr || result}
{/if} - -
{/if}