From ae2482024a714107424402fb2ccfb6ad06dc8d2b Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Sun, 28 Oct 2018 13:31:18 +0000 Subject: [PATCH] Fix header not being discarded from content --- main.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.lisp b/main.lisp index f9b1a36..15a6202 100644 --- a/main.lisp +++ b/main.lisp @@ -9,11 +9,12 @@ (defun content-lines (lines) (loop with found-header-p = nil for line in lines + when found-header-p + collect line into post-header-lines when (string= line "---") - do (setf found-header-p t - content-lines nil) + do (setf found-header-p t) collect line into content-lines - finally (return content-lines))) + finally (return (if found-header-p post-header-lines content-lines)))) (defun make-site (&optional output-dir) (let ((*output-dir* (or output-dir *output-dir*)) -- GitLab