From 3de1fc65168f948ff088594fac4ae5fd3ac1ab66 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sun, 13 Feb 2022 16:55:04 -0500 Subject: Add front-matter for series I don't intend to finish --- haunt/jakob/utils.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'haunt/jakob') diff --git a/haunt/jakob/utils.scm b/haunt/jakob/utils.scm index 20869be..a3ad1b7 100644 --- a/haunt/jakob/utils.scm +++ b/haunt/jakob/utils.scm @@ -63,8 +63,10 @@ is of an odd length and every second element is DELIM." (result '())) (match sxml (() (remove-footnote-references (reverse result))) - ((or (('p ...) _ ...) (paragraph _ ...)) - (remove-footnote-references (reverse (cons paragraph result)))) + ((or (('p ...) tail ...) (paragraph tail ...)) + (if (and (list? paragraph) (eqv? 'header (car paragraph))) + (loop tail result) ; Ignore front-matter. + (remove-footnote-references (reverse (cons paragraph result))))) ((head . tail) (loop tail (cons head result)))))) -- cgit v1.3