diff --git a/src/components/InteractiveCode.astro b/src/components/InteractiveCode.astro index 58fe499..2ccf905 100644 --- a/src/components/InteractiveCode.astro +++ b/src/components/InteractiveCode.astro @@ -1,7 +1,7 @@ --- const {code} = Astro.props; -let c = trimAndDedent(code as string); +let c = trimAndDedent(code); /** * Performs the following: @@ -73,9 +73,27 @@ function trimAndDedent(input: string): string { return lines.join("\n"); } +// TODO: Apply syntax highlighting + --- -
- Interactive code :D -
{c}
+
+ thp code +
{c}
+
+
+
stdout
+
+ aaaa +
+ bbbb +
+
+
+
state
+
+ x = 20 +
+
+
diff --git a/src/pages/learn/basics/hello-world.mdx b/src/pages/learn/basics/hello-world.mdx index 9acf22b..dd9b66c 100644 --- a/src/pages/learn/basics/hello-world.mdx +++ b/src/pages/learn/basics/hello-world.mdx @@ -19,13 +19,13 @@ Then run `thp hello.thp`