doc updates

pull/111/head
Matthew Butterick 9 years ago
parent 8c297f105c
commit d05148f263

@ -1 +1 @@
1454722003 1454963513

@ -125,7 +125,7 @@ The @racket[_txexpr-proc], @racket[_block-txexpr-proc], and @racket[_inline-txex
@examples[#:eval my-eval @examples[#:eval my-eval
(define tx '(div "Please" (em "mind the gap") (h1 "Tuesdays only"))) (define tx '(div "Please" (em "mind the gap") (h1 "Tuesdays only")))
(define add-ns (λ(tx) (make-txexpr (define add-ns (λ(tx) (txexpr
(string->symbol (format "ns:~a" (get-tag tx))) (string->symbol (format "ns:~a" (get-tag tx)))
(get-attrs tx) (get-attrs tx)
(get-elements tx)))) (get-elements tx))))

@ -706,7 +706,7 @@ We change this by giving @racket[decode-elements] the name of a processing funct
#lang pollen #lang pollen
◊(require pollen/decode txexpr) ◊(require pollen/decode txexpr)
◊(define (root . elements) ◊(define (root . elements)
(make-txexpr 'root empty (decode-elements elements (txexpr 'root empty (decode-elements elements
#:txexpr-elements-proc decode-paragraphs))) #:txexpr-elements-proc decode-paragraphs)))
The first line of the 'first' paragraph. The first line of the 'first' paragraph.
@ -740,7 +740,7 @@ Of course, in practice you wouldn't put your decoding function in a single sourc
(require pollen/decode txexpr) (require pollen/decode txexpr)
(provide root) (provide root)
(define (root . elements) (define (root . elements)
(make-txexpr 'root empty (decode-elements elements (txexpr 'root empty (decode-elements elements
#:txexpr-elements-proc decode-paragraphs))) #:txexpr-elements-proc decode-paragraphs)))
}] }]
@ -775,7 +775,7 @@ This time, however, we're going to attach them to another part of @racket[decode
(require pollen/decode pollen/misc/tutorial txexpr) (require pollen/decode pollen/misc/tutorial txexpr)
(provide root) (provide root)
(define (root . elements) (define (root . elements)
(make-txexpr 'root empty (decode-elements elements (txexpr 'root empty (decode-elements elements
#:txexpr-elements-proc decode-paragraphs #:txexpr-elements-proc decode-paragraphs
#:string-proc (compose1 smart-quotes smart-dashes)))) #:string-proc (compose1 smart-quotes smart-dashes))))
}] }]
@ -817,7 +817,7 @@ Here, we'll use the @filepath{pollen.rkt} we devised in the previous section to
(require pollen/decode pollen/misc/tutorial txexpr) (require pollen/decode pollen/misc/tutorial txexpr)
(provide root) (provide root)
(define (root . elements) (define (root . elements)
(make-txexpr 'root empty (decode-elements elements (txexpr 'root empty (decode-elements elements
#:txexpr-elements-proc decode-paragraphs #:txexpr-elements-proc decode-paragraphs
#:string-proc (compose smart-quotes smart-dashes)))) #:string-proc (compose smart-quotes smart-dashes))))
}] }]

Loading…
Cancel
Save