Skip to content

Commit

Permalink
fix: Removed extra double quotes from computed style in shiki code co…
Browse files Browse the repository at this point in the history
…mponent (#8035)
  • Loading branch information
fyndor authored Aug 15, 2023
1 parent 560e459 commit a12027b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-owls-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Removed extra double quotes from computed style in shiki code component
4 changes: 2 additions & 2 deletions packages/astro/components/Code.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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}>`;
},
Expand Down

0 comments on commit a12027b

Please sign in to comment.