Add list tag

This commit is contained in:
Jeremy Dormitzer 2020-08-15 12:58:01 -04:00
parent 9f893daf72
commit 9273cf5749

View File

@ -97,3 +97,18 @@
(make-keyword-procedure
(lambda (kws kw-args . elements)
(txexpr 'em (zip-kws kws kw-args) elements))))
(define (process-list-item item)
(let ((item (string-trim
(string-trim item "-" #:right? #f))))
(when (and item (non-empty-string? item))
`(li ,item))))
(define list
(make-keyword-procedure
(lambda (kws kw-args . elements)
(txexpr 'ul
(zip-kws kws kw-args)
(filter (lambda (x) (not (void? x)))
(map process-list-item
elements))))))