diff options
author | David Thompson <dthompson2@worcester.edu> | 2024-06-28 12:48:44 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2024-06-28 12:48:44 -0400 |
commit | b2bb8acedce825cef843390077f8a64cab885a0b (patch) | |
tree | 414f01bf8c5503ca48ec1dd331559e6d239baeb3 | |
parent | 05893ef4de330da0fb5be4c49d4d62cda3244fde (diff) |
Wrote this a long time ago. Not sure why it was so silly. Thanks to
elb on IRC for pointing out that the code was trash lol.
-rw-r--r-- | theme.scm | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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" |