This commit is contained in:
2025-11-14 17:30:19 +01:00
parent 5b19b729c4
commit 9ff15dd9f7
26 changed files with 1044 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
function wrapTextLinesInSpan(element){
const lines = element.textContent.split('\n').filter(Boolean);
element.textContent = '';
for (let index = 0; index < lines.length; index++) {
const span = document.createElement('span');
span.className = 'line';
span.textContent = lines[index];
element.appendChild(span);
if(index < lines.length - 1){
element.appendChild(document.createTextNode('\n'));
}
}
}
document.querySelectorAll('pre.number-lines').forEach(wrapTextLinesInSpan);