From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/13749 Path: news.gmane.org!not-for-mail From: Elliott Slaughter Newsgroups: gmane.text.pandoc Subject: Walk all blocks except inside footnotes Date: Sat, 17 Oct 2015 13:12:36 -0700 Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11355e2c971d590522528867 X-Trace: ger.gmane.org 1445112769 29455 80.91.229.3 (17 Oct 2015 20:12:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2015 20:12:49 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDRLZB6H3ABBBNWXRKYQKGQESLV6J3Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Oct 17 22:12:44 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-qg0-f57.google.com ([209.85.192.57]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZnXqJ-0007S8-Aj for gtp-pandoc-discuss@m.gmane.org; Sat, 17 Oct 2015 22:12:39 +0200 Original-Received: by qgez77 with SMTP id z77sf27952155qge.0 for ; Sat, 17 Oct 2015 13:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:date:message-id:subject:from:to:content-type :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe; bh=oAUxCxL6LtsLPkWHLiYk21WLx0qlKULLgBYD5fIlAHo=; b=nqgldfEy6uWYGEXSYhpQ6hc5cT3JgQw7PxYsZ+9kYct1/bNgDsBOLVCbs5Q+UNf7Ce SY5v7bSqx5vakM5QBvZhZRzOfPgfXRlvHh2+aQBfO1nKWvAXcooqBgogZVQgL3w7LiTG iLBX+YQeBCa7YeJV2gtIkzTMSZOg4/2VrhgM98YDXa7PG5QzJZaJCKNm1rmlx6V6iAOI cDwYDwFHQL0h5s0Ktq35oUZs8QHM4HSumHBaQ9Wl17qre1YmrfkKpu0mrqDCofTfExm6 viUrWjaiJyU1nql8UUBW4UtSQQLBkFOITbETl7sVFw9ROQXViT/kh8b7Ga9o9yhQV6O4 wiCQ== X-Received: by 10.182.112.234 with SMTP id it10mr233040obb.13.1445112758541; Sat, 17 Oct 2015 13:12:38 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.182.252.196 with SMTP id zu4ls893817obc.59.gmail; Sat, 17 Oct 2015 13:12:37 -0700 (PDT) X-Received: by 10.182.241.228 with SMTP id wl4mr17978987obc.8.1445112757958; Sat, 17 Oct 2015 13:12:37 -0700 (PDT) Original-Received: from mail-qg0-x22b.google.com (mail-qg0-x22b.google.com. [2607:f8b0:400d:c04::22b]) by gmr-mx.google.com with ESMTPS id q133si1785836ywb.1.2015.10.17.13.12.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Oct 2015 13:12:37 -0700 (PDT) Received-SPF: pass (google.com: domain of elliottslaughter-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:400d:c04::22b as permitted sender) client-ip=2607:f8b0:400d:c04::22b; Original-Received: by mail-qg0-x22b.google.com with SMTP id d10so34508702qga.3 for ; Sat, 17 Oct 2015 13:12:37 -0700 (PDT) X-Received: by 10.140.104.33 with SMTP id z30mr27269426qge.0.1445112757817; Sat, 17 Oct 2015 13:12:37 -0700 (PDT) Original-Received: by 10.55.214.156 with HTTP; Sat, 17 Oct 2015 13:12:36 -0700 (PDT) X-Original-Sender: elliottslaughter-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of elliottslaughter-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:400d:c04::22b as permitted sender) smtp.mailfrom=elliottslaughter-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:13749 Archived-At: --001a11355e2c971d590522528867 Content-Type: text/plain; charset=UTF-8 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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAJ9X%3DkbfnfzLzD3J-yk0VgDCzPzep1fO2STyFnOSmmq14j%2BSPQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. --001a11355e2c971d590522528867 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I am using Text.Pandoc.Walk to trans= form all blocks of a certain type. This works great, except that it recurse= s into blocks contained inside footnotes and also applies the transformatio= n 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. Howe= ver, I am struggling to do this within the structure of Text.Pandoc.Walk be= cause 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

"Do= n't worry about what anybody else is going to do. The best way to predi= ct the future is to invent it." - Alan Kay

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://gro= ups.google.com/d/msgid/pandoc-discuss/CAJ9X%3DkbfnfzLzD3J-yk0VgDCzPzep1fO2S= TyFnOSmmq14j%2BSPQ%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--001a11355e2c971d590522528867--