summaryrefslogtreecommitdiff
path: root/static/main.js
diff options
context:
space:
mode:
authorAlexis Hovorka <[email protected]>2024-08-17 19:32:06 -0600
committerAlexis Hovorka <[email protected]>2024-08-17 19:32:06 -0600
commitd2a685e50d20101a42b7d9d08d1b90bb92defcd3 (patch)
tree36d844396b638488f989aab9f2cba73b208fc0b2 /static/main.js
parentf5890b7e14fd5c7d4aa11f089bfaf851a94a85a0 (diff)
[feat] Yet more tweaks
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 0858183..258e260 100644
--- a/static/main.js
+++ b/static/main.js
@@ -17,7 +17,7 @@ document.addEventListener("DOMContentLoaded", () => {
[...d[q]("pre.hljs code")].forEach(e => e.innerHTML =
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)
+ (i+(+(e.dataset.starting||1))).toString().padStart(+e.dataset.numLength||Math.ceil(Math.log10(a.length)), 0)
}">${l}</div>`).join("\n"));
// Disable Android Chrome "tap to search" when revealing spoiler text