diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-08 01:34:56 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-08 01:34:56 +0200 |
commit | 3862e80eccfcd702ca344de9d6d13bc30d896157 (patch) | |
tree | cabe010007fe536b064cee47982957b133ada416 /module | |
parent | TODO about list parser. (diff) | |
download | calp-3862e80eccfcd702ca344de9d6d13bc30d896157.tar.gz calp-3862e80eccfcd702ca344de9d6d13bc30d896157.tar.xz |
Repair ics output.
Diffstat (limited to 'module')
-rw-r--r-- | module/output/ical.scm | 5 | ||||
-rw-r--r-- | module/output/types.scm | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/module/output/ical.scm b/module/output/ical.scm index dd7653cb..d0dcd98c 100644 --- a/module/output/ical.scm +++ b/module/output/ical.scm @@ -27,7 +27,8 @@ ;; fields which can hold lists need not be considered here, ;; since they are split into multiple vlines when we parse them. (cond - [(and=> (param vline 'VALUE) string->symbol) => get-writer] + ;; TODO parameters return? One or many‽ + [(and=> (param vline 'VALUE) (compose string->symbol car)) => get-writer] [(memv key '(COMPLETED DTEND DUE DTSTART RECURRENCE-ID CREATED DTSTAMP LAST-MODIFIED ACKNOWLEDGED EXDATE)) @@ -125,7 +126,7 @@ [(key values ...) (string-append ";" (symbol->string key) - (string-join (map (compose (get-writer 'TEXT) ->string) values) + (string-join (map (compose escape-chars ->string) values) "," 'infix))]) (parameters vline))) ":" (value-format key vline)))) diff --git a/module/output/types.scm b/module/output/types.scm index 8eff2ee6..76a03ff1 100644 --- a/module/output/types.scm +++ b/module/output/types.scm @@ -46,7 +46,7 @@ ((@ (vcomponent recurrence internal) recur-rule->rrule-string) value)) -(define (escape-chars str) +(define-public (escape-chars str) (define (escape char) (string #\\ char)) (string-concatenate |