mirror of
https://github.com/welpo/tabi.git
synced 2026-05-11 16:47:36 +02:00
🐛 fix: avoid copying code block line numbers (#647)
Co-authored-by: welpo <welpo@users.noreply.github.com>
This commit is contained in:
parent
17029f02b1
commit
35098abea3
2 changed files with 8 additions and 2 deletions
|
|
@ -27,7 +27,13 @@ const copyCodeAndChangeIcon = async (copyDiv, block) => {
|
|||
};
|
||||
|
||||
const getNonTableCode = (block) => {
|
||||
return [...block.querySelectorAll('code')].map((code) => code.textContent).join('');
|
||||
return [...block.querySelectorAll('code')]
|
||||
.map((code) => {
|
||||
const clone = code.cloneNode(true);
|
||||
clone.querySelectorAll('.giallo-ln').forEach(el => el.remove());
|
||||
return clone.textContent;
|
||||
})
|
||||
.join('');
|
||||
};
|
||||
|
||||
const getTableCode = (block) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue