From: EBkysko <ebkysko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Type of the `filter' argument to traversal functions
Date: Tue, 11 Aug 2020 16:02:20 -0700 (PDT) [thread overview]
Message-ID: <996602a6-8c95-406c-b569-f381f517af31o@googlegroups.com> (raw)
In-Reply-To: <20200812014715.1c4ddc723344d9fb5f9c92e9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1365 bytes --]
True, it was not literally your example, but what a "table of function"
would be using your example, I worded incorrectly. (and by the way, your
example would need commas to separate the inner tables :) )
A Lua filter is a table of functions as described in the official page, it
is not an array (ie a numerical indexed table).
It is true though that a .lua script has to return an *array of filters*,
as said in the guide:
Pandoc expects each Lua file to return a list of filters
>
So:
- a Lua filter is a table of functions.
- walk_block (and walk_inline) take a Lua filter (table of functions) as
second argument)
- a script must return an array of filters (i.e. an array of tables of
functions)
- a script can return many filters, such as:
return {
{ Meta = meta_begin },
{ Pandoc = pandoc_preprocess }.
{ Div = div_preprocess, Para = parasol, Span = doSpan },
{ Inlines = doInlines, Blocks = doBlocks},
{ BulletList = whatever },
}
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/996602a6-8c95-406c-b569-f381f517af31o%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2111 bytes --]
next prev parent reply other threads:[~2020-08-11 23:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-11 19:09 Anton Shepelev
[not found] ` <20200811220909.e97f97ce8e8dad5d575d90f6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-08-11 19:21 ` John MacFarlane
2020-08-11 21:46 ` Anton Shepelev
[not found] ` <20200812004617.ec382d94b849e234bbaa6762-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-08-11 22:15 ` EBkysko
2020-08-11 22:47 ` Anton Shepelev
[not found] ` <20200812014715.1c4ddc723344d9fb5f9c92e9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-08-11 23:02 ` EBkysko [this message]
[not found] ` <996602a6-8c95-406c-b569-f381f517af31o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-08-11 23:36 ` EBkysko
2020-08-12 0:24 ` John MacFarlane
[not found] ` <m2o8nghfs7.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-08-12 8:19 ` BPJ
[not found] ` <CADAJKhCR8ZQwWhEW2x_b9sUAyMikaFEySXnQCFVtFWq6VOdRKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-08-12 8:22 ` BPJ
2020-08-12 9:32 ` Anton Shepelev
[not found] ` <20200812123257.14be2d659f808e89ecb7e7f9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-08-12 11:40 ` EBkysko
2020-08-12 9:17 ` Anton Shepelev
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=996602a6-8c95-406c-b569-f381f517af31o@googlegroups.com \
--to=ebkysko-re5jqeeqqe8avxtiumwx3w@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).