summaryrefslogtreecommitdiff
path: root/haunt.scm
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-04-29 19:36:42 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-04-29 19:36:42 -0400
commit9cfb91ab031046161ba8241e6e360d52b8f5ee5c (patch)
tree2849f7190e63665fb2fddc663ecf2d5e778ec3c5 /haunt.scm
parentdd497a8af809080787ed06d25cb83938381b2406 (diff)
Remove assumption that content is enclosed in <article>
Diffstat (limited to 'haunt.scm')
-rw-r--r--haunt.scm13
1 files changed, 6 insertions, 7 deletions
diff --git a/haunt.scm b/haunt.scm
index d7cb9b5..0fa918b 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -67,13 +67,12 @@
(define (first-paragraph post)
(let loop ((sxml (post-sxml post))
(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)))))))
+ (match sxml
+ (() (reverse result))
+ ((or (('p ...) _ ...) (paragraph _ ...))
+ (reverse (cons paragraph result)))
+ ((head . tail)
+ (loop tail (cons head result))))))
(define %collections
`(("Recent Blog Posts" "index.html" ,posts/reverse-chronological)))