Skip to content

Commit

Permalink
Fix unquoted attribute in EPUB output
Browse files Browse the repository at this point in the history
Closes #571
  • Loading branch information
marijnh committed Mar 7, 2024
1 parent 08cfb2a commit 7f663a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render_html.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ let renderer = {
fence(token) {
let config = /\S/.test(token.info) ? PJSON.parse(token.info) : {}
if (config.hidden) return "";
let lang = config.lang || "javascript", tab = lang == "html" || lang == "javascript" ? " tabindex=0" : ""
let lang = config.lang || "javascript", tab = lang == "html" || lang == "javascript" ? " tabindex=\"0\"" : ""
return `\n\n<pre${attrs(token)}${tab} class="snippet" data-language="${lang}" ${config.focus ? " data-focus=\"true\"" : ""}${config.sandbox ? ` data-sandbox="${config.sandbox}"` : ""}${config.meta ? ` data-meta="${config.meta}"` : ""}>${anchor(token)}${highlight(lang, token.content.trimRight())}</pre>`
},

Expand Down

0 comments on commit 7f663a1

Please sign in to comment.