wrap-hanging-quotes
only wraps the first instance
#246
Closed
opened 4 years ago by qmoya
·
4 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
New to Pollen, to Racket, to LISP, and even to hanging quotes, I’m surely doing something stupid. My apologies in advance.
I have this (copy-pasted) snippet inside
pollen.rkt
:I process this:
However, the resulting X-expression looks like this:
That is, only the first
“
gets wrapped.I played with the composition order, and with the other keyword arguments of
decode
—all in vain.Could someone lend me a hand?
Thank you so much!
Looks like has to do with the order in which
decode
applies the different-proc
functions. I.e. in your example (which admittedly comes straight from the docs)decode-paragraphs
probably hasn’t added in all the paragraph elements beforewrap-hanging-quotes
is called.I can get it to look right by breaking it up into two successive calls to
decode
, which allows us to control the order better:This results in:
Some further notes: the code you see in the documentation for
decode
probably hasn’t been touched in a while, and might not be accurate to how Practical Typography works any more.Also, it would be nice for that documentation to describe in more detail the order in which the different
-proc
functions are called, so it’s more obvious when multiple passes are needed. There are a couple of paragraphs that speak to this topic but there are some gaps in the timeline, so to speak:If Matthew doesn’t do it first, I’ll go spelunking and maybe propose some edits to the docs.
I agree this example is obsolete. I have removed it. If you want to learn how to write tag functions, I recommend installing the
pollen-tfl
package and reading through its documentation.Closing due to lack of activity. Please reopen if issue persists.