mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-11-21 10:40:41 +08:00
Only prepare code blocks inside each Markdown block
Every Markdown instance searched the whole page, so code blocks got an extra wrapper and copy button for each other Markdown block on the page.
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
|
||||
// Replaces code blocks in the background with highlighted code.
|
||||
const prefix = "language-";
|
||||
const nodes = Array.from(document.body.querySelectorAll("pre code"));
|
||||
const nodes = Array.from(container.querySelectorAll("pre code"));
|
||||
|
||||
const treeChanges: Promise<void>[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user