summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-10-02 20:47:37 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-10-02 20:47:37 -0400
commit33702f3777a760ba8ae84088bf582b6953d4a256 (patch)
treeffc2afdb1be5de056fafe0fc409f6b26c6ea3e52
parentc67e8e924c664ae4035862cc7b439cd7ec4bcef6 (diff)
html: Remove 'raw' element type.
* haunt/html.scm (sxml->html): Remove 'raw' element renderer. * haunt/reader.scm (read-html-post): Parse to SXML, rather than reading a raw string.
-rw-r--r--haunt/html.scm3
-rw-r--r--haunt/reader.scm5
2 files changed, 4 insertions, 4 deletions
diff --git a/haunt/html.scm b/haunt/html.scm
index 0984194..f630a68 100644
--- a/haunt/html.scm
+++ b/haunt/html.scm
@@ -113,9 +113,6 @@ list ATTRS and the child nodes in BODY."
(() *unspecified*)
(('doctype type)
(doctype->html type port))
- ;; Unescaped, raw HTML output.
- (('raw html)
- (display html port))
(((? symbol? tag) ('@ attrs ...) body ...)
(element->html tag attrs body port))
(((? symbol? tag) body ...)
diff --git a/haunt/reader.scm b/haunt/reader.scm
index 461b4be..6d4477d 100644
--- a/haunt/reader.scm
+++ b/haunt/reader.scm
@@ -31,6 +31,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (ice-9 rdelim)
+ #:use-module (sxml simple)
#:use-module (haunt post)
#:use-module (haunt utils)
#:export (make-reader
@@ -110,7 +111,9 @@ post."
((eof-object? line)
(error "end of file while reading metadata: " (port-filename port)))
((string=? line "---")
- (values metadata `(raw ,(read-string port))))
+ (values metadata
+ (match (xml->sxml port)
+ (('*TOP* sxml) sxml))))
(else
(match (map string-trim-both (string-split-at line #\:))
(((= string->symbol key) value)