summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--theme.scm11
1 files changed, 5 insertions, 6 deletions
diff --git a/theme.scm b/theme.scm
index 05eec3f..ceafd01 100644
--- a/theme.scm
+++ b/theme.scm
@@ -38,14 +38,13 @@
(img (@ (src "https://licensebuttons.net/l/by-sa/4.0/80x15.png")))))
(define (first-paragraph post)
- (let loop ((sxml (post-sxml post))
- (result '()))
+ (let loop ((sxml (post-sxml post)))
(match sxml
- (() (reverse result))
- ((or (('p ...) _ ...) (paragraph _ ...))
- (reverse (cons paragraph result)))
+ (() '())
+ (((and paragraph ('p . _)) . _)
+ (list paragraph))
((head . tail)
- (loop tail (cons head result))))))
+ (cons head (loop tail))))))
(define dthompson-theme
(theme #:name "dthompson"