Only push language uri once on load stack

pull/39/head
Marcel van der Boom 6 years ago
parent b034a08350
commit 3b4d14f194
  1. 5
      templates/include/post-render.tmpl

@ -44,8 +44,9 @@
// Check what we need to load
for (i=0; i < lb.length; i++) {
lang = lb[i].className.replace('language-','');
if (!langs.includes(lang)) {
jss.push(hlbaseUri + "languages/" + lang + ".min.js");
lurl = hlbaseUri + "languages/" + lang + ".min.js";
if (!(langs.includes(lang) || jss.includes(lurl))) {
jss.push(lurl);
}
}
// Load files in order, higlight on last load

Loading…
Cancel
Save