From 91fc32b306a56a605b62fd7884163d483a46cbe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 24 Dec 2019 00:40:20 +0100 Subject: Fix ical outuput for with recurrence-id:s. --- module/output/ical.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'module') diff --git a/module/output/ical.scm b/module/output/ical.scm index 3dbc74b8..146afc8c 100644 --- a/module/output/ical.scm +++ b/module/output/ical.scm @@ -17,7 +17,7 @@ (with-throw-handler 'wrong-type-arg (lambda () (case key - ((DTSTART DTEND) + ((DTSTART DTEND RECURRENCE-ID) (time->string (value vline) (if (prop vline 'TZID) "~Y~m~dT~H~M~S" "~Y~m~dT~H~M~SZ" ))) @@ -41,12 +41,13 @@ (define (escape-chars str) (with-output-to-string (lambda () - (string-for-each (lambda (ch) - (case ch - ((#\, #\; #\\) => (lambda (c) (display "\\") (display c))) - ((#\newline) (display "\\n")) - (else (display ch))) - ) str)))) + (string-for-each + (lambda (ch) + (case ch + ((#\, #\; #\\) => (lambda (c) (display "\\") (display c))) + ((#\newline) (display "\\n")) + (else (display ch)))) + str)))) ;; Fold long lines to limit width. ;; Since this works in characters, but ics works in bytes -- cgit v1.2.3