diff options
author | Graham Christensen <graham@grahamc.com> | 2018-04-05 07:54:01 -0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2018-04-05 07:54:01 -0400 |
commit | 8f33464ca7a603301cf9a5a213be23ca701d6cce (patch) | |
tree | b524e95295d498a5241d04b977ec12b03769bf96 /pkgs | |
parent | ced3a201e39397f5c7a311d40525088494ea7808 (diff) |
nixos docs: syntax highlight
- Rectifies diverging CSS by combining
nixos/nixpkgs docs CSS
- Moves our custom Highlight.js loader in to
the hljs package
- Switches the nixos docs to use SVG
callouts too
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/misc/documentation-highlighter/loader.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/misc/documentation-highlighter/loader.js b/pkgs/misc/documentation-highlighter/loader.js new file mode 100644 index 000000000000..4ad7dbf24b51 --- /dev/null +++ b/pkgs/misc/documentation-highlighter/loader.js @@ -0,0 +1,7 @@ +/* This file is NOT part of highlight.js */ +document.onreadystatechange = function () { + var listings = document.querySelectorAll('.programlisting, .screen'); + for (i = 0; i < listings.length; ++i) { + hljs.highlightBlock(listings[i]); + } +} |