diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-04-27 19:28:03 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-04-27 19:28:03 -0400 |
| commit | 1d8c982f0b1b285e2609d2b15065d4512dcafe9b (patch) | |
| tree | aebf3600862e88175cd3c84dd6ea41c3142a72ea /haunt.scm | |
| parent | fb034a971cec6dfdf2b0b0a213f6278bf3017007 (diff) | |
Update 'first-paragraph to support ox-haunt output
Diffstat (limited to 'haunt.scm')
| -rw-r--r-- | haunt.scm | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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" |