diff --git a/layouts/shortcodes/paige/code.html b/layouts/shortcodes/paige/code.html
index 7ee32ce8..06b9104d 100644
--- a/layouts/shortcodes/paige/code.html
+++ b/layouts/shortcodes/paige/code.html
@@ -1,5 +1,5 @@
- {{ highlight .Inner (.Get 0 | default (.Get "lang")) (.Get 2 | default (.Get "options")) }}
+ {{ highlight (.Inner | replaceRE "^\n" "") (.Get 0 | default (.Get "lang")) (.Get 2 | default (.Get "options")) }}
{{ with (.Get 1 | default (.Get "caption")) }}
{{ . }}
{{ end }}