summaryrefslogtreecommitdiff
path: root/www/src/components/Shell.astro
diff options
context:
space:
mode:
Diffstat (limited to 'www/src/components/Shell.astro')
-rw-r--r--www/src/components/Shell.astro9
1 files changed, 5 insertions, 4 deletions
diff --git a/www/src/components/Shell.astro b/www/src/components/Shell.astro
index d2738329a..3147ba886 100644
--- a/www/src/components/Shell.astro
+++ b/www/src/components/Shell.astro
@@ -4,10 +4,11 @@ export interface Props {
}
const { code } = Astro.props;
---
-
-<pre><code>{code.trim().split('\n').map(ln => <span class="line">
-{ln.startsWith('#') ? <span class="comment">{ln}</span> : ln}
-</span>)}</code></pre>
+<pre><code>{String(code).trim().split('\n').map(
+ line => <span class="line">{
+ line.startsWith('#') ? <span class="comment">{line}</span> : line
+ }</span>)
+}</code></pre>
<style>
pre, code {