From 60ade1ac7df55cd4034122cbdb20de70d91c1153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 22 May 2020 23:39:21 +0200 Subject: Remove (vcomponent output) module. --- module/output/ical.scm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'module/output/ical.scm') diff --git a/module/output/ical.scm b/module/output/ical.scm index e289456b..1c9ce187 100644 --- a/module/output/ical.scm +++ b/module/output/ical.scm @@ -75,15 +75,16 @@ (handle-value (value vline)))) (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)))) + (define (escape char) + (string #\\ char)) + (string-concatenate + (map (lambda (c) + (case c + ((#\newline) "\\n") + ((#\, #\; #\\) => escape) + (else => string))) + (string->list str)))) + (define (generate-uuid) ((@ (rnrs io ports) call-with-port) -- cgit v1.2.3