diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-04-11 23:34:47 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-04-11 23:34:47 -0400 |
commit | fc06ea3d9d01bf7c4a4c6cc444301d0554d3dc91 (patch) | |
tree | 0062010058245ad5e54a94c1b810fd0c2e54661c | |
parent | 44fdd16202c0b6e82922d8b5e869f399922ea056 (diff) |
html: Add sxml->html-string.
* haunt/build/html.scm (sxml->html-string): New procedure.
-rw-r--r-- | haunt/build/html.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/haunt/build/html.scm b/haunt/build/html.scm index b95ca81..5c6455d 100644 --- a/haunt/build/html.scm +++ b/haunt/build/html.scm @@ -28,7 +28,8 @@ #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (ice-9 hash-table) - #:export (sxml->html)) + #:export (sxml->html + sxml->html-string)) (define %void-elements '(area @@ -368,3 +369,9 @@ list ATTRS and the child nodes in BODY." (string->escaped-html text port)) ;; Render arbitrary Scheme objects, too. (obj (object->escaped-html obj port)))) + +(define (sxml->html-string sxml) + "Render SXML as an HTML string." + (call-with-output-string + (lambda (port) + (sxml->html sxml port)))) |