From 10b392c5033b003c785cd39279a0a0e332955dfe Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 15 Feb 2021 14:50:35 -0800 Subject: [PATCH] remove obsolete example (#246) --- pollen/private/ts.rktd | 2 +- pollen/scribblings/decode.scrbl | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/pollen/private/ts.rktd b/pollen/private/ts.rktd index b9fce1c..e0c1e57 100644 --- a/pollen/private/ts.rktd +++ b/pollen/private/ts.rktd @@ -1 +1 @@ -1613427909 +1613429435 diff --git a/pollen/scribblings/decode.scrbl b/pollen/scribblings/decode.scrbl index c1431cd..e74cbf6 100644 --- a/pollen/scribblings/decode.scrbl +++ b/pollen/scribblings/decode.scrbl @@ -44,17 +44,6 @@ This function doesn't do much on its own. Rather, it provides the hooks upon whi Recall that in Pollen, all @secref["tags-are-functions"]. By default, the @racket[_tagged-xexpr] from a source file is tagged with @racket[root]. So the typical way to use @racket[decode] is to attach your decoding functions to it, and then define @racket[root] to invoke your @racket[decode] function. Then it will be automatically applied to every @racket[doc] during compile. -For instance, here's how @racket[decode] is attached to @racket[root] in @link["http://practicaltypography.com"]{@italic{Butterick's Practical Typography}}. There's not much to it — - -@racketblock[ -(define (root . items) - (decode (txexpr 'root '() items) - #:txexpr-elements-proc decode-paragraphs - #:block-txexpr-proc (compose1 hyphenate wrap-hanging-quotes) - #:string-proc (compose1 smart-quotes smart-dashes) - #:exclude-tags '(style script))) - ] - @margin-note{The @racket[hyphenate] function is not part of Pollen, but rather the @link["http://github.com/mbutterick/hyphenate"]{@racket[hyphenate] package}, which you can install separately.} This illustrates another important point: even though @racket[decode] presents an imposing list of arguments, you're unlikely to use all of them at once. These represent possibilities, not requirements. For instance, let's see what happens when @racket[decode] is invoked without any of its optional arguments.