diff --git a/pollen/scribblings/template.scrbl b/pollen/scribblings/template.scrbl
index 131de5a..495d2dc 100644
--- a/pollen/scribblings/template.scrbl
+++ b/pollen/scribblings/template.scrbl
@@ -114,7 +114,7 @@ Note that if @racket[_meta-source] is a relative path or pagenode, it is treated
-@section{HTML templates}
+@section{HTML}
@defmodule[pollen/template/html]
@@ -125,7 +125,7 @@ Functions specific to HTML templates.
[xexpr-or-xexprs (or/c xexpr? (listof xexpr?))]
[#:tag html-tag (or/c #f txexpr-tag?) #f]
[#:attrs html-attrs (or/c #f txexpr-attrs?) #f]
-[#:splice splice-html? boolean? #f])
+[#:splice? splice-html? boolean? #f])
string?]
Convert @racket[_xexpr-or-xexprs] to an HTML string. Similar to @racket[xexpr->string], but consistent with the HTML spec, text that appears within @code{script} or @code{style} blocks will not be escaped.
@@ -161,13 +161,13 @@ If the generated HTML has an outer tag, the @racket[_splice-html?] option will s
@examples[#:eval my-eval
(define tx '(root (p "Chicken nuggets")))
(->html tx)
-(->html tx #:splice #t)
+(->html tx #:splice? #t)
(define x "Fancy sauce")
(->html x)
(code:comment @#,t{This next one won't do anything})
-(->html x #:splice #t)
-(code:comment @#,t{Adds the outer tag, but then #:splice removes it})
-(->html x #:tag 'div #:attrs '((id "doback")) #:splice #t)
+(->html x #:splice? #t)
+(code:comment @#,t{Adds the outer tag, but then #:splice? removes it})
+(->html x #:tag 'div #:attrs '((id "doback")) #:splice? #t)
]
diff --git a/pollen/template/html.rkt b/pollen/template/html.rkt
index fe41bbc..0414dbb 100644
--- a/pollen/template/html.rkt
+++ b/pollen/template/html.rkt
@@ -7,8 +7,8 @@
paren-match)
-(define+provide/contract (->html x-arg #:tag [tag #f] #:attrs [attrs #f] #:splice [splice? #f])
- (((or/c txexpr-element? txexpr-elements?)) (#:tag (or/c #f txexpr-tag?) #:attrs (or/c #f txexpr-attrs?) #:splice boolean?) . ->* . string?)
+(define+provide/contract (->html x-arg #:tag [tag #f] #:attrs [attrs #f] #:splice? [splice? #f] #:splice [bwc-splice? #f])
+ (((or/c txexpr-element? txexpr-elements?)) (#:tag (or/c #f txexpr-tag?) #:attrs (or/c #f txexpr-attrs?) #:splice? boolean? #:splice boolean?) . ->* . string?)
(define x (cond
[(txexpr? x-arg) x-arg]
@@ -24,7 +24,7 @@
(define html-attrs (or attrs (and (txexpr? x) (get-attrs x)) null))
(define html-elements (or (and (txexpr? x) (get-elements x)) (list x)))
(define html (xexpr->html (txexpr html-tag html-attrs html-elements)))
- (if (or splice? (and (list? x-arg) (not (txexpr? x-arg)) (not tag)))
+ (if (or splice? bwc-splice? (and (list? x-arg) (not (txexpr? x-arg)) (not tag)))
(trim-outer-tag html)
html)]
[else (xexpr->html x)]))
@@ -34,18 +34,18 @@
(check-equal? (->html tx) " hello hello hello
hello
") + (check-equal? (->html #:splice? #t tx) "hello
") (check-equal? (->html #:tag 'brennan #:attrs '((id "dale")) tx) "hello
hello
") (define x "hello") (check-equal? (->html x) "hello") (check-equal? (->html #:tag 'brennan x) "