src/setup-highlighter.js
function loadHighlighter () {
  var headElem = d.querySelector('head');

  headElem.appendChild(h('link', {
    rel: 'stylesheet',
    href: 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css'
  }));

  headElem.appendChild(h('script', {
    src: 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js'
  }));

  var interval = setInterval(function () {
    if (!!window.hljs) {
      clearInterval(interval);
      applyHighlighter();
    }
  }, 100);
}
function loadHighlighter () {
  var headElem = d.querySelector('head');

  headElem.appendChild(h('link', {
    rel: 'stylesheet',
    href: 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css'
  }));

  headElem.appendChild(h('script', {
    src: 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js'
  }));

  var interval = setInterval(function () {
    if (!!window.hljs) {
      clearInterval(interval);
      applyHighlighter();
    }
  }, 100);
}
function loadHighlighter ( ) { var headElem = d . querySelector ( 'head' ) ; headElem . appendChild ( h ( 'link' , { rel : 'stylesheet' , href : 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css' } ) ) ; headElem . appendChild ( h ( 'script' , { src : 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js' } ) ) ; var interval = setInterval ( function ( ) { if ( ! ! window . hljs ) { clearInterval ( interval ) ; applyHighlighter ( ) ; } } , 100 ) ; }
load syntax highlighting code
load syntax highlighting code