aboutsummaryrefslogtreecommitdiff
path: root/module/output/ical.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/output/ical.scm')
-rw-r--r--module/output/ical.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/module/output/ical.scm b/module/output/ical.scm
index 02dd5d64..fd4091ed 100644
--- a/module/output/ical.scm
+++ b/module/output/ical.scm
@@ -97,6 +97,11 @@
(ical-line-fold (string-drop string wrap-len)))]
[else string]))
+(define* (internal-field? symbol optional: (prefix "X-HNH-"))
+ (string=? prefix
+ (string-take-to (symbol->string symbol)
+ (string-length prefix))))
+
(define-public (component->ical-string component)
(format #t "BEGIN:~a\r\n" (type component))
;; TODO this leaks internal information,
@@ -105,11 +110,8 @@
;; Special cases depending on key.
;; Value formatting is handled in @code{value-format}.
(match-lambda*
- ;; Handled below
- [('X-HNH-ALTERNATIVES _) 'noop]
- ;; Remove from output
- [('X-HNH-FILENAME _) 'noop]
+ [(? (compose internal-field? car)) 'noop]
[(key (vlines ...))
(for vline in vlines