`(" "
(span (@ (style "margin: 0 3px")) ⦿)
(span (@ (class "tags"))
- ,@(map (lambda (tag)
- `((a (@ (href ,(format #f "tags/~a.html" tag))) ,tag) " "))
- tags)))))
+ ,@(drop-right
+ (apply
+ append
+ (map (lambda (tag)
+ `((a (@ (href ,(format #f "tags/~a.html" tag))) ,tag) ", "))
+ tags))
+ 1)))))
(else
div))))
(site-post-slug site post) ".html"))
(define (get-paragraphs sxml count)
- (let ((pars (filter
- (lambda (e) (and (pair? e) (eq? (car e) 'p)))
- sxml)))
- (list-head pars (min count (length pars)))))
+ (define (getp sxml count res)
+ (cond ((or (= count 0) (null? sxml))
+ res)
+ ((and (pair? (car sxml)) (eq? (caar sxml) 'p))
+ (getp (cdr sxml) (- count 1) (cons (car sxml) res)))
+ (else
+ (getp (cdr sxml) count (cons (car sxml) res)))))
+ (reverse (getp sxml count '())))
(define (post-summary post)
(or (post-ref post 'summary)