mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 22:26:57 +01:00
Make code blocks focusable
This commit is contained in:
parent
3ac05d8cdd
commit
39d96f22a0
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ function enhanceContent(content, opts = {}) {
|
||||||
p.querySelectorAll('br').forEach((br) => br.replaceWith('\n'));
|
p.querySelectorAll('br').forEach((br) => br.replaceWith('\n'));
|
||||||
});
|
});
|
||||||
const codeText = nextParagraphs.map((p) => p.innerHTML).join('\n\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);
|
block.replaceWith(pre);
|
||||||
nextParagraphs.forEach((p) => p.remove());
|
nextParagraphs.forEach((p) => p.remove());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue