1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00
nixpkgs/pkgs/misc/documentation-highlighter/loader.js
Graham Christensen 8f33464ca7
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
2018-04-05 07:54:01 -04:00

8 lines
256 B
JavaScript

/* 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]);
}
}