aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-11 20:29:37 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-12 00:07:04 +0200
commit1bbefbe6ef5b18c7b6f72d7fb9abd759c3fbca3d (patch)
tree4b527babf9071d8ba97e2e56a0c02e0fedc2dfa0
parentRe-add (sxml html). (diff)
downloadcalp-1bbefbe6ef5b18c7b6f72d7fb9abd759c3fbca3d.tar.gz
calp-1bbefbe6ef5b18c7b6f72d7fb9abd759c3fbca3d.tar.xz
Extend sxml->html to copy procedures output verbatim.
sxml->xml already allows arbitrary strings to be included through procedures current output port. This adds the same feature to sxml->html for feature parity.
-rw-r--r--module/sxml/html.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/sxml/html.scm b/module/sxml/html.scm
index 94015460..473cfd9e 100644
--- a/module/sxml/html.scm
+++ b/module/sxml/html.scm
@@ -364,6 +364,8 @@ ist ATTRS and the child nodes in BODY."
(pi->html type body port))
(('*TOP* nodes ...)
(for-each (cut sxml->html <> port) nodes))
+ ((? procedure? proc) ; is whole tree a procedure
+ (with-output-to-port port proc))
(((? symbol? tag) ('@ attrs ...) body ...)
(element->html tag attrs body port))
(((? symbol? tag) body ...)