You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
800 B
Racket
25 lines
800 B
Racket
#lang scribble/manual
|
|
|
|
@(require scribble/eval pollen/cache pollen/world (for-label racket (except-in pollen #%module-begin) pollen/template pollen/render xml))
|
|
|
|
@(define my-eval (make-base-eval))
|
|
@(my-eval `(require pollen pollen/template xml))
|
|
|
|
@title{Template}
|
|
|
|
@defmodule[pollen/template]
|
|
|
|
Convenience functions for templates. These are automatically imported into the @racket[eval] environment when rendering with a template (see @racket[render]).
|
|
|
|
@defproc[
|
|
(->html
|
|
[tx txexpr?])
|
|
string?]
|
|
Convert @racket[_tx] 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.
|
|
|
|
@examples[#:eval my-eval
|
|
(define tx '(root (script "3 > 2") "Why is 3 > 2?"))
|
|
(xexpr->string tx)
|
|
(->html tx)
|
|
]
|