Skip to content

Commit 6a772b8

Browse files
committed
nav.js: use textContent for syntax blocks
1 parent 3009a79 commit 6a772b8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

assets/nav.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@
135135
// Reference and example pages: replace .syntax-block and .impl-block
136136
document.querySelectorAll('.syntax-block, .impl-block').forEach(el => {
137137
if (!el.parentNode) return;
138-
const code = el.innerHTML
139-
.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&').trim();
138+
const code = el.textContent.trim();
140139
if (!code) return;
141140
const wrap = document.createElement('div');
142141
el.parentNode.replaceChild(wrap, el);

0 commit comments

Comments
 (0)