diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-04-29 19:36:42 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-04-29 19:36:42 -0400 |
| commit | 9cfb91ab031046161ba8241e6e360d52b8f5ee5c (patch) | |
| tree | 2849f7190e63665fb2fddc663ecf2d5e778ec3c5 /haunt.scm | |
| parent | dd497a8af809080787ed06d25cb83938381b2406 (diff) | |
Remove assumption that content is enclosed in <article>
Diffstat (limited to 'haunt.scm')
| -rw-r--r-- | haunt.scm | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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))) |