diff --git a/.changeset/tall-owls-act.md b/.changeset/tall-owls-act.md new file mode 100644 index 000000000000..d50d607c7618 --- /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 a990e877a470..ee7a84a09a44 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}`; },