summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/four-kids-melt.md5
-rw-r--r--packages/astro/components/Debug.astro4
2 files changed, 8 insertions, 1 deletions
diff --git a/.changeset/four-kids-melt.md b/.changeset/four-kids-melt.md
new file mode 100644
index 000000000..4b6d7700e
--- /dev/null
+++ b/.changeset/four-kids-melt.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Bug fix for Debug when passed JSON contain HTML strings
diff --git a/packages/astro/components/Debug.astro b/packages/astro/components/Debug.astro
index c25ce0f0e..85e90bbb7 100644
--- a/packages/astro/components/Debug.astro
+++ b/packages/astro/components/Debug.astro
@@ -1,4 +1,6 @@
---
+import Code from './Code.astro';
+
const key = Object.keys(Astro.props)[0];
const value = Astro.props[key];
---
@@ -8,7 +10,7 @@ const value = Astro.props[key];
<h2 class="debug-title"><span class="debug-label">Debug</span> <span class="debug-name">"{key}"</span></h2>
</div>
- <pre>{JSON.stringify(value, null, 2)}</pre>
+ <Code code={JSON.stringify(value, null, 2)} />
</div>
<style>