From 4feac6dcd217d5415d198510941bdafc77d9774a Mon Sep 17 00:00:00 2001 From: Michael Demetriou Date: Thu, 27 Jun 2019 18:13:20 +0300 Subject: [PATCH] Remove `langs` list from `post-render` as it does not actually do anything useful (see https://github.com/writeas/writefreely/pull/128#issuecomment-506207107) --- templates/include/post-render.tmpl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/include/post-render.tmpl b/templates/include/post-render.tmpl index 517b291..8d7a816 100644 --- a/templates/include/post-render.tmpl +++ b/templates/include/post-render.tmpl @@ -6,8 +6,6 @@ var hlbaseUri = "/js/"; var lb = document.querySelectorAll("code[class^='language-']"); - // Set langs to the langs that are included by default (for now: 'common set' on CDN) - var langs = []; // Custom aliasmap var aliasmap = { @@ -65,7 +63,7 @@ // Support the aliases specified above if (aliasmap[lang]) lang = aliasmap[lang]; lurl = hlbaseUri + "highlightjs/" + lang + ".min.js"; - if (!(langs.includes(lang) || jss.includes(lurl))) { + if (!jss.includes(lurl)) { jss.push(lurl); } }