diff --git a/layouts/partials/highlight-js.html b/layouts/partials/highlight-js.html
index 1567008..5a0eea9 100644
--- a/layouts/partials/highlight-js.html
+++ b/layouts/partials/highlight-js.html
@@ -1,12 +1,15 @@
{{ if .Site.Params.highlightjs }}
-
-{{ with .Site.Params.highlightjslanguages }}
-{{ range . }}
-
-{{ end }}
-{{ end }}
-
+ {{ $hl := newScratch }}
+ {{ $hl.Set "languages" .Site.Params.highlightjslanguages }}
+
+ {{ with $hl.Get "languages" }}
+ {{ range . }}
+
+ {{ end }}
+ {{ end }}
+
+ {{ $hl.Delete "languages" }}
{{ end }}