From 1d8c982f0b1b285e2609d2b15065d4512dcafe9b Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Sat, 27 Apr 2019 19:28:03 -0400 Subject: Update 'first-paragraph to support ox-haunt output --- haunt.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'haunt.scm') diff --git a/haunt.scm b/haunt.scm index 25aadcd..07d23e3 100644 --- a/haunt.scm +++ b/haunt.scm @@ -67,12 +67,13 @@ (define (first-paragraph post) (let loop ((sxml (post-sxml post)) (result '())) - (match sxml - (() (reverse result)) - ((or (('p ...) _ ...) (paragraph _ ...)) - (reverse (cons paragraph result))) - ((head . tail) - (loop tail (cons head result)))))) + (when (eqv? (car sxml) 'article) + (match (cdr sxml) + (() (reverse result)) + ((or (('p ...) _ ...) (paragraph _ ...)) + (reverse (cons paragraph result))) + ((head . tail) + (loop tail (cons head result))))))) (define jakob-theme (theme #:name "jakob" -- cgit v1.3