fix: Removed extra double quotes from computed style in shiki code component (#8035)

This commit is contained in:
Greg Cobb 2023-08-15 07:29:16 -07:00 committed by GitHub
parent 560e459246
commit a12027b6af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Removed extra double quotes from computed style in shiki code component

View file

@ -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}>`;
},