public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BPJ <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Lua filters: Extensions with pandoc.read?
Date: Mon, 19 Sep 2022 15:34:54 +0200	[thread overview]
Message-ID: <CADAJKhApJjnCMghJ61rg6H2U9_zOP3Q=RJxHc9E2dFUH0Py+Sg@mail.gmail.com> (raw)
In-Reply-To: <87czbrfrzr.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]

Den mån 19 sep. 2022 14:51Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
skrev:

>
> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > What is the proper way to include (reader) extensions with
> > `pandoc.read`? Specifically `-tex_math_dollars`,
> > `-shortcut_reference_links` and `+four_space_rule`.
> >
> > I have read the docu but I don't get it, so an example (here and in
> > the docu) would be much appreciated!
>
> Extensions have to be passed as part of the format string, e.g.,
>
>     pandoc.read(source, 'markdown-tex_math_dollars')
>
> I'm not entirely happy with this, as it means that any extensions passed
> via a ReaderOptions object will be ignored.
>
>     -- this may seem like it should disable all extensions,
>     -- but the ReaderOptions `extensions` field is ignored.
>     -- The default 'markdown' extensions will be used instead.
>     pandoc.read(src, 'markdown', {extensions = {}})
>
> Ideas to improve this would be most welcome.
>

I would just change it to not ignore reader options, and throw an error if
the format string and the reader options contradict each other (except for
empty table = no extensions and no extensions in string = default
extensions). And better hurry before someone starts to rely on reader
options being ignored! :-)


>
> --
> Albert Krewinkel
> GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124
>
> --
> 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/87czbrfrzr.fsf%40zeitkraut.de
> .
>

-- 
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/CADAJKhApJjnCMghJ61rg6H2U9_zOP3Q%3DRJxHc9E2dFUH0Py%2BSg%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3599 bytes --]

  parent reply	other threads:[~2022-09-19 13:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19 12:02 BPJ
     [not found] ` <CADAJKhCqSXXZBPvXRfr+h4ady_yCzO6s=VDKY_Tt54dcLtDR5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-09-19 12:39   ` Albert Krewinkel
     [not found]     ` <87czbrfrzr.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-09-19 13:34       ` BPJ [this message]
     [not found]         ` <CADAJKhApJjnCMghJ61rg6H2U9_zOP3Q=RJxHc9E2dFUH0Py+Sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-10-04  9:13           ` Albert Krewinkel
     [not found]             ` <87v8oz3ohm.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-10-04 10:33               ` BPJ
     [not found]                 ` <CADAJKhCg3rMk+0fJBOcte32BVh2c9tYQHa57DEGHdyAz2u7+kQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-10-04 13:31                   ` Albert Krewinkel
     [not found]                     ` <87r0zn3dff.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-10-04 17:25                       ` John MacFarlane
     [not found]                         ` <5AC38771-6A87-47C2-80C7-5C7B389EDD1B-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-10-06 11:11                           ` BPJ
     [not found]                             ` <CADAJKhCan6ec3ruV5r08ynTFPVLUtOpc=h+Jt7-geYNUcJb6QA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-10-07  6:16                               ` BPJ

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='CADAJKhApJjnCMghJ61rg6H2U9_zOP3Q=RJxHc9E2dFUH0Py+Sg@mail.gmail.com' \
    --to=bpj-j3h7gcxpsitlodktgw+v6w@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).