diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-11 19:39:37 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-11 19:39:52 +0200 |
commit | ad78b193271abb6df486d3acfd7ab94f51cd101c (patch) | |
tree | 5dc061066f266aa650720db56768291f6c4842f9 /module/vcomponent | |
parent | HTML Created events now have a description. (diff) | |
download | calp-ad78b193271abb6df486d3acfd7ab94f51cd101c.tar.gz calp-ad78b193271abb6df486d3acfd7ab94f51cd101c.tar.xz |
Can create events without descriptions again.
Diffstat (limited to 'module/vcomponent')
-rw-r--r-- | module/vcomponent/parse/xcal.scm | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/module/vcomponent/parse/xcal.scm b/module/vcomponent/parse/xcal.scm index 76bdb251..06745864 100644 --- a/module/vcomponent/parse/xcal.scm +++ b/module/vcomponent/parse/xcal.scm @@ -126,21 +126,27 @@ (let ((params (handle-parameters parameters)) (tag* (symbol-upcase tag))) (for (type value) in (zip type value) - (set! (prop* component tag*) - (make-vline tag* - (handle-tag - tag (handle-value type params value)) - params))))] + ;; ignore empty fields + ;; mostly for <text/> + (unless (null? value) + (set! (prop* component tag*) + (make-vline tag* + (handle-tag + tag (handle-value type params value)) + params)))))] [(tag (type value ...) ...) (for (type value) in (zip type value) - (let ((params (make-hash-table)) - (tag* (symbol-upcase tag))) - (set! (prop* component tag*) - (make-vline tag* - (handle-tag - tag (handle-value type params value)) - params))))]))) + ;; ignore empty fields + ;; mostly for <text/> + (unless (null? value) + (let ((params (make-hash-table)) + (tag* (symbol-upcase tag))) + (set! (prop* component tag*) + (make-vline tag* + (handle-tag + tag (handle-value type params value)) + params)))))]))) ;; children (awhen (assoc-ref sxcal 'components) |