From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Walk all blocks except inside footnotes
Date: Sat, 17 Oct 2015 16:25:07 -0700 [thread overview]
Message-ID: <20151017232507.GA37611@MacBook-Air.local> (raw)
In-Reply-To: <CAJ9X=kbfnfzLzD3J-yk0VgDCzPzep1fO2STyFnOSmmq14j+SPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Have you looked at regular syb generics?
Data.Generic.Schemes has some functions that look
like good candidates, such as everywhereBut.
+++ Elliott Slaughter [Oct 17 15 13:12 ]:
> Hi,
> I am using Text.Pandoc.Walk to transform all blocks of a certain type.
> This works great, except that it recurses into blocks contained inside
> footnotes and also applies the transformation there, which is not what
> I want.
> What I would like is a way to stop the recursion at footnotes to
> prevent them from being transformed, as I have (to the best of my
> knowledge) no way to tell that a block is inside a footnote when I'm
> looking at it. However, I am struggling to do this within the structure
> of Text.Pandoc.Walk because the function provides no mechanisms to
> direct or abort recursion, and even if it did, the footnotes themselves
> are inlines, not blocks.
> I know I could write the traversal by hand in Haskell, but is time
> consuming and would require much more code. Is there a better
> alternative?
> Thanks in advance.
> --
> Elliott Slaughter
> "Don't worry about what anybody else is going to do. The best way to
> predict the future is to invent it." - Alan Kay
>
> --
> You received this message because you are subscribed to the Google
> Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to
> [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> [3]https://groups.google.com/d/msgid/pandoc-discuss/CAJ9X%3DkbfnfzLzD3J
> -yk0VgDCzPzep1fO2STyFnOSmmq14j%2BSPQ%40mail.gmail.com.
> For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
> 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> 2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> 3. https://groups.google.com/d/msgid/pandoc-discuss/CAJ9X=kbfnfzLzD3J-yk0VgDCzPzep1fO2STyFnOSmmq14j+SPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org?utm_medium=email&utm_source=footer
> 4. https://groups.google.com/d/optout
prev parent reply other threads:[~2015-10-17 23:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 20:12 Elliott Slaughter
[not found] ` <CAJ9X=kbfnfzLzD3J-yk0VgDCzPzep1fO2STyFnOSmmq14j+SPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-17 23:25 ` John MacFarlane [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151017232507.GA37611@MacBook-Air.local \
--to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).