Make code blocks focusable
This commit is contained in:
parent
3ac05d8cdd
commit
39d96f22a0
|
@ -120,7 +120,7 @@ function enhanceContent(content, opts = {}) {
|
|||
p.querySelectorAll('br').forEach((br) => br.replaceWith('\n'));
|
||||
});
|
||||
const codeText = nextParagraphs.map((p) => p.innerHTML).join('\n\n');
|
||||
pre.innerHTML = `<code>${codeText}</code>`;
|
||||
pre.innerHTML = `<code tabindex="0">${codeText}</code>`;
|
||||
block.replaceWith(pre);
|
||||
nextParagraphs.forEach((p) => p.remove());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue