Skip to content

Commit f351392

Browse files
committed
nav.js: hide original pre before CM replacement
1 parent d198119 commit f351392

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

assets/nav.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
document.head.appendChild(marker);
124124
const dark = document.body.classList.contains('dark-mode');
125125
document.querySelectorAll('.syntax-block, .impl-block, pre#code-pre').forEach(el => {
126+
el.style.display = 'none'; // hide original immediately
126127
if (!el.parentNode) return;
127128
const code = (el.tagName === 'PRE' ? el.textContent : el.innerHTML
128129
.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&')).trim();

0 commit comments

Comments
 (0)