From 0861b053d8f5bd13e8323115df11a37a2e77b706 Mon Sep 17 00:00:00 2001 From: Araozu Date: Sun, 19 May 2024 22:05:01 -0500 Subject: [PATCH] Implement stdout print --- src/components/InteractiveCode.astro | 22 +++++++++++++++++++--- src/pages/learn/basics/hello-world.mdx | 14 +++++++++++++- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/components/InteractiveCode.astro b/src/components/InteractiveCode.astro index b875794..3125473 100644 --- a/src/components/InteractiveCode.astro +++ b/src/components/InteractiveCode.astro @@ -125,14 +125,17 @@ const codeHtml = highlightCode(trimAndDedent(code));
- +
diff --git a/src/pages/learn/basics/hello-world.mdx b/src/pages/learn/basics/hello-world.mdx index 778315c..592ad64 100644 --- a/src/pages/learn/basics/hello-world.mdx +++ b/src/pages/learn/basics/hello-world.mdx @@ -38,5 +38,17 @@ f(x, y) f(x, y) `} - steps={`[ [["line", 1]], [["line", 2]] ]`} + steps={`[ + [["line", 1]], + [["line", 2]], + [["line", 8]], + [["line", 4]], + [["line", 5]], + [ + ["out", "gaaaa 322 322"], + ["line", 6] + ], + [["line", 8]], + [["line", 0]] + ]`} >