diff options
author | Jake Leahy <jake@leahy.dev> | 2024-09-09 17:42:45 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 09:42:45 +0200 |
commit | 6a5aa007010f90141199f3a4eb14ab85105ddac7 (patch) | |
tree | e03d6f08d7824a9752c2e8293cfffbf91e5ef6ac /tools | |
parent | 79a65da22a56eaeafce24b7c08c9d7db017173ac (diff) | |
download | Nim-6a5aa007010f90141199f3a4eb14ab85105ddac7.tar.gz |
Fix CSS for `number-lines` code blocks (#24081)
Adds a few fixes for when using code blocks with lines numbered - Use CSS variables for the colours so that it works in dark mode - Don't turn on normal table effects like hover and smaller font when its a line number table - With dochack.nim, don't add a clipboard copy button for the line numbers at the side [Example page showing the changes](https://66dcde6e4a655efb70771d9a--dazzling-kitten-6c3419.netlify.app/)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dochack/dochack.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/dochack/dochack.nim b/tools/dochack/dochack.nim index 0753248bc..946945346 100644 --- a/tools/dochack/dochack.nim +++ b/tools/dochack/dochack.nim @@ -328,8 +328,8 @@ proc copyToClipboard*() {.exportc.} = function updatePreTags() { - const allPreTags = document.querySelectorAll("pre") - + const allPreTags = document.querySelectorAll("pre:not(.line-nums)") + allPreTags.forEach((e) => { const div = document.createElement("div") |