diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-05-09 21:43:16 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-05-09 21:43:16 +0200 |
commit | c1feb55a2013116c3291cf0df26f9ab39ad3e8c3 (patch) | |
tree | 7e7c2b0b756e45a1fd1b177bb137d3225560bc37 /module/output | |
parent | Un-escape escaped characters. Slow? (diff) | |
download | calp-c1feb55a2013116c3291cf0df26f9ab39ad3e8c3.tar.gz calp-c1feb55a2013116c3291cf0df26f9ab39ad3e8c3.tar.xz |
New parser now on feature parity with old.
Diffstat (limited to 'module/output')
-rw-r--r-- | module/output/html.scm | 11 |
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) |