diff options
author | 2021-11-18 22:21:58 -0800 | |
---|---|---|
committer | 2021-11-18 22:21:58 -0800 | |
commit | c82ceff7eb2fa77ca2a268562c0ff47c8b0f1e66 (patch) | |
tree | 37892063f172c7eb8f07c8ae4ba25a3867749237 | |
parent | 4c0cb47204f549f3457ad5be7386468807295964 (diff) | |
download | astro-c82ceff7eb2fa77ca2a268562c0ff47c8b0f1e66.tar.gz astro-c82ceff7eb2fa77ca2a268562c0ff47c8b0f1e66.tar.zst astro-c82ceff7eb2fa77ca2a268562c0ff47c8b0f1e66.zip |
fix #1778
-rw-r--r-- | .changeset/four-kids-melt.md | 5 | ||||
-rw-r--r-- | packages/astro/components/Debug.astro | 4 |
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> |