summaryrefslogtreecommitdiff
path: root/static/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/main.js')
-rw-r--r--static/main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/static/main.js b/static/main.js
index 317bd18..0858183 100644
--- a/static/main.js
+++ b/static/main.js
@@ -15,7 +15,7 @@ document.addEventListener("DOMContentLoaded", () => {
// Add line numbers to code blocks
[...d[q]("pre.hljs code")].forEach(e => e.innerHTML =
- e.innerHTML.split("\n").map((l,i,a) => l &&
+ e.innerHTML.split("\n").slice(0,-1).map((l,i,a) =>
`<div class="code-line" data-line-number="${
(i+1).toString().padStart(Math.ceil(Math.log10(a.length)), 0)
}">${l}</div>`).join("\n"));