summaryrefslogtreecommitdiff
path: root/haunt.scm
diff options
context:
space:
mode:
Diffstat (limited to 'haunt.scm')
-rw-r--r--haunt.scm13
1 files changed, 7 insertions, 6 deletions
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"