diff options
author | 2023-08-15 07:29:16 -0700 | |
---|---|---|
committer | 2023-08-15 22:29:16 +0800 | |
commit | a12027b6af411be39700919ca47e240a335e9887 (patch) | |
tree | d38dcf4224b4ca823fdd8e2ab4aee616525400dd | |
parent | 560e45924622141206ff5b47d134cb343d6d2a71 (diff) | |
download | astro-a12027b6af411be39700919ca47e240a335e9887.tar.gz astro-a12027b6af411be39700919ca47e240a335e9887.tar.zst astro-a12027b6af411be39700919ca47e240a335e9887.zip |
fix: Removed extra double quotes from computed style in shiki code component (#8035)
-rw-r--r-- | .changeset/tall-owls-act.md | 5 | ||||
-rw-r--r-- | packages/astro/components/Code.astro | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/.changeset/tall-owls-act.md b/.changeset/tall-owls-act.md new file mode 100644 index 000000000..d50d607c7 --- /dev/null +++ b/.changeset/tall-owls-act.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Removed extra double quotes from computed style in shiki code component diff --git a/packages/astro/components/Code.astro b/packages/astro/components/Code.astro index a990e877a..ee7a84a09 100644 --- a/packages/astro/components/Code.astro +++ b/packages/astro/components/Code.astro @@ -74,9 +74,9 @@ const html = renderToHtml(tokens, { // Handle code wrapping // if wrap=null, do nothing. if (wrap === false) { - style += '; overflow-x: auto;"'; + style += '; overflow-x: auto;'; } else if (wrap === true) { - style += '; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;"'; + style += '; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;'; } return `<${tag} class="${className}" style="${style}" tabindex="0">${children}</${tag}>`; }, |