Make code blocks focusable

pull/228/head
Lim Chee Aun 2023-09-02 20:49:25 +08:00
rodzic 3ac05d8cdd
commit 39d96f22a0
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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());
}