354a5ac365ed96df2fd13f5087033d114b83ec31 — Aluísio Augusto Silva Gonçalves 9 months ago 688bab4
haunt: Fix TOC non-generation

`when` returns `#unspecified` when the condition is false, and that is
output literally.  We need to output an empty node list here instead.
1 files changed, 1 insertions(+), 1 deletions(-)

M haunt.scm
M haunt.scm => haunt.scm +1 -1
@@ 184,7 184,7 @@
                         `(@ (id "content") (class "e-content"))
                         `(@ (id "content") (class "e-content") (lang ,lang)))))
    `((h1 ,header-attrs ,(post-ref post 'title))
      ,(when (post-ref post 'toc) (sxml-toc (post-sxml post)))
      ,(if (post-ref post 'toc) (sxml-toc (post-sxml post)) '())
      (div ,body-attrs ,(post-sxml post)))))

(define (aasg-post-template post)