From 5fc41687be6bca83dea563e0910e89016e0b0794 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 3 Dec 2018 12:18:04 -0500 Subject: [PATCH] Fix whitespace --- templates/include/post-render.tmpl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/templates/include/post-render.tmpl b/templates/include/post-render.tmpl index 7079ccd..1ad2454 100644 --- a/templates/include/post-render.tmpl +++ b/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)});