Fix whitespace

pull/39/head
Matt Baer 6 years ago
parent 3b4d14f194
commit 5fc41687be
  1. 21
      templates/include/post-render.tmpl

@ -22,12 +22,13 @@
// Given a array of URIs, load them in order
function loadLanguages(uris, callback) {
uris.forEach(function(uri) {
var sc=document.createElement('script');
sc.src=uri; sc.async=false; // critical?
if( uris.indexOf(uri) == uris.length-1) {
sc.onload = callback;
}
document.head.appendChild(sc);
var sc = document.createElement('script');
sc.src = uri;
sc.async = false; // critical?
if (uris.indexOf(uri) == uris.length-1) {
sc.onload = callback;
}
document.head.appendChild(sc);
});
}
@ -44,10 +45,10 @@
// Check what we need to load
for (i=0; i < lb.length; i++) {
lang = lb[i].className.replace('language-','');
lurl = hlbaseUri + "languages/" + lang + ".min.js";
if (!(langs.includes(lang) || jss.includes(lurl))) {
jss.push(lurl);
}
lurl = hlbaseUri + "languages/" + lang + ".min.js";
if (!(langs.includes(lang) || jss.includes(lurl))) {
jss.push(lurl);
}
}
// Load files in order, higlight on last load
loadLanguages(jss, () => {highlight(lb)});

Loading…
Cancel
Save