diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-11-03 13:36:22 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-11-03 13:36:22 +0100 |
commit | 3f49d48ae608d5fb618453a8e2fa875b9d5420e2 (patch) | |
tree | 4345a25a5d14ff50711cbd9a58e8eacedc240ca4 /module/vcomponent/base.scm | |
parent | Remove ALL c code. (diff) | |
download | calp-3f49d48ae608d5fb618453a8e2fa875b9d5420e2.tar.gz calp-3f49d48ae608d5fb618453a8e2fa875b9d5420e2.tar.xz |
Readd color parsing, fix minor bugs.
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/base.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/module/vcomponent/base.scm b/module/vcomponent/base.scm index f43f532e..86ea40e8 100644 --- a/module/vcomponent/base.scm +++ b/module/vcomponent/base.scm @@ -16,11 +16,12 @@ (let ((parent (primitive-make-vcomponent))) (for-each (lambda (child) (add-child! parent child)) (read-vcalendar path)) - (if (null? (get-component-children parent)) - (set-attribute! parent 'X-HNH-SOURCETYPE "vdir") - (set-attribute! parent 'X-HNH-SOURCETYPE - (get-attribute-value (car (get-component-children parent)) - 'X-HNH-SOURCETYPE "vdir"))) + (set-attribute! + parent 'X-HNH-SOURCETYPE + (if (null? (get-component-children parent)) + "vdir" + (get-attribute-value (car (get-component-children parent)) + 'X-HNH-SOURCETYPE "vdir"))) parent)) ;; vline → value @@ -72,7 +73,7 @@ (define-public parent get-component-parent) (define-public (attributes component) - (hash-map->list cons (get-component-attributes component))) + (map car (hash-map->list cons (get-component-attributes component)))) (define*-public children get-component-children) |