aboutsummaryrefslogtreecommitdiff
path: root/module/output/html.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-09 21:43:16 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-09 21:43:16 +0200
commitc1feb55a2013116c3291cf0df26f9ab39ad3e8c3 (patch)
tree7e7c2b0b756e45a1fd1b177bb137d3225560bc37 /module/output/html.scm
parentUn-escape escaped characters. Slow? (diff)
downloadcalp-c1feb55a2013116c3291cf0df26f9ab39ad3e8c3.tar.gz
calp-c1feb55a2013116c3291cf0df26f9ab39ad3e8c3.tar.xz
New parser now on feature parity with old.
Diffstat (limited to 'module/output/html.scm')
-rw-r--r--module/output/html.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 31b57228..da5c0659 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -145,12 +145,17 @@
,(fmt-single-event ev))))
+(define (->string a)
+ (format #f "~a" a))
+
(define (data-attributes event)
(hash-map->list
(match-lambda*
+ [(key (vlines ...)) (list (string->symbol (format #f "data-~a" key))
+ (string-join (map (compose ->string value) vlines) ","))]
[(key vline)
(list (string->symbol (format #f "data-~a" key))
- (format #f "~a" (value vline)))]
+ (->string (value vline)))]
[_ (error "What are you doing‽")])
(attributes event)))
@@ -354,7 +359,7 @@
,((compose (@ (vcomponent recurrence display) format-recurrence-rule)
(@ (vcomponent recurrence parse) parse-recurrence-rule))
(attr ev 'RRULE))
- ,@(awhen (attr ev 'EXDATE)
+ ,@(awhen (attr* ev 'EXDATE)
(list
", undantaget "
(add-enumeration-punctuation
@@ -371,7 +376,7 @@
'(HOURLY MINUTELY SECONDLY))
(datetime->string d "~e ~b ~k:~M")
(datetime->string d "~e ~b"))))
- it))))
+ (map value it)))))
"."))
(define (format-description ev str)