From bad310815a8ff002f3b276ecc849c367f062efdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 29 Dec 2019 00:47:59 +0100 Subject: Handle X-HNH-ALTERNATIVES in ics output. --- module/output/ical.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module') diff --git a/module/output/ical.scm b/module/output/ical.scm index d2f5800c..6fedc391 100644 --- a/module/output/ical.scm +++ b/module/output/ical.scm @@ -69,6 +69,7 @@ ;; Special cases depending on key. ;; Value formatting is handled in @code{value-format}. (match-lambda* + ;; Handled below [('X-HNH-ALTERNATIVES _) 'noop] [(key vline) @@ -83,7 +84,9 @@ (for-each component->ical-string (children component)) (format #t "END:~a\r\n" (type component)) - ) + ;; If we have alternatives, splice them in here. + (cond [(attr component 'X-HNH-ALTERNATIVES) + => (lambda (alts) (map component->ical-string alts))])) (define (print-header) (format #t -- cgit v1.2.3