From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31408 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Lua filters: Extensions with pandoc.read? Date: Mon, 19 Sep 2022 15:34:54 +0200 Message-ID: References: <87czbrfrzr.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006056ee05e907c799" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28486"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBCXAUGMQMGQEIHKQVJA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Sep 19 15:35:11 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pg1-f183.google.com ([209.85.215.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oaGvX-0007Ba-AM for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 19 Sep 2022 15:35:11 +0200 Original-Received: by mail-pg1-f183.google.com with SMTP id a33-20020a630b61000000b00429d91cc649sf13864337pgl.8 for ; Mon, 19 Sep 2022 06:35:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663594510; cv=pass; d=google.com; s=arc-20160816; b=O5rU1kl0CXZflpOHibka6EMvQasdJ43wXOYYVNsE6G3W91lM9ep967VNWcdrK78gjl QpyFRoSJnKFAuUCNMxKvMOloWeo01dbnsKCYvFatQBApFrecMT62cOqbXkzgknnV33DO ydy2PVtN3WAGfaFql/vY/0TuWO2rhrl7KxE/MuAND49nEInoSWxacjWJTklt/hPuAuFx w2cEeRp2kWv4g5x6e6r+00D+a6uorriplj76wWWCYR4Ye9olALIy/1jve8qR/lv+qZJa s5OVS52UQTP0TUehnIAw4+eaKcj3OheOwlES/EG4Y02ioy5xqkiAhH97Ue2SVxlWX7XJ 64XA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:sender:dkim-signature; bh=mhSIJpd5uZN50vSvjEcQ3u4aqotW1RevlAp9QkB6gew=; b=N6YTxj2+TAcC6b4GJriiBtKW5brWxBR18DRwSAs+mnsUvfbx692HcfAbHAAVlK27+o 3SNM4sGv8XEPEtjaS/GVBAn8cmAJJVn9Kilmr9B9OYzgMvqOzWhlIji7MJJeV7IvZTE1 Z025QzuDBtIbbZ8sAx1HO8/3V1B1X6wWIk1yUW7uq0iDb0uXCxv6w+Ymv2H1TuoPt90s 58TfbIc9E26nk9405eHe3px2dwMqOfnZ+nXfRpsOBOjvybwn+OrFoWBHpwm2MOLCucf8 FZFc4yACOpet2u6x7ieAr/8TdspbpNwPCcrYxDlF9i5Kh/wPxorb+GnxNxed612QIBL/ KJJw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.181 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:sender:from:to:cc:subject:date; bh=mhSIJpd5uZN50vSvjEcQ3u4aqotW1RevlAp9QkB6gew=; b=FoKt2ZvkeMPEZAKRoEH4rnRmfyCBrYGYdTQFXmHiOagdGpOGWw6GftUn2CFgiAB8ZU 3QixpK44F8sCp5fb2Lg2fmEcmbLQ1PluK5gssh9Lf+FYzm7yBdBhyo970x6IHoYUUh9i kWusQ6JIbGQb42wJIqRDldJdzUkxbYbhI4SpInpZRD2H01Ej0OighvL9NIhhORzJCwTk a/F+z9DxffUdRki9SsnN0ltGADJ7v90Re1UeoPRRMGojrRbHWKU7XRZBhoxzcNaMadCS EfgUyysyc2bJDVF7iUppJI19Uf1hWKeQ8cglECpS/ncfxQWT+GXoIVown62Wqv++mijl 5ePQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:reply-to:in-reply-to:references:mime-version :x-gm-message-state:sender:from:to:cc:subject:date; bh=mhSIJpd5uZN50vSvjEcQ3u4aqotW1RevlAp9QkB6gew=; b=Ih7QIYYFzY9Aq1fg3bx3jWIjG1KLQc5G3saGkgAtIHJH0jsYvQnctoVSEEAIBeFFjb X9ZRb7cTRouNvO+acRCO4nelzEGxwpMLD+hVPe5cStJgudj7pJhlmNp35tO3il4eo+G/ eck7LKbZpEjW1LVaNNrP64oGCCLdMNII/3pZqCcuPUE2NIX9ER6Tn01kB1MoKr/jPVqQ lgrPct3MQvXQhgFzsJgoR8/e0KFq/skpbCGTfcTFU68Wlh+o0Jwii5gILgJcGj1nI0K6 42eFR99mf8HoDephNKJiKNHeGuMBxEoDRfvWk9VAec8UuBGzi0POknaOlDKJta4NJG41 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf2N4t+yzInL/B18VERPugVj412mDXq+MUrhgXdrLI22TQLv9Xpf wXS90i2d0UlaCatexxmY5Pc= X-Google-Smtp-Source: AMsMyM5aB+KMMAO+MxA7R8Bj2BYpRTMAxlkMR6/C8Eu2TrIXNl6pLUByMRyjg6pRWzha0ceejX2Cxg== X-Received: by 2002:a17:902:c40f:b0:178:aa6f:7e53 with SMTP id k15-20020a170902c40f00b00178aa6f7e53mr547953plk.20.1663594509876; Mon, 19 Sep 2022 06:35:09 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:90a:1f46:b0:202:c046:4732 with SMTP id y6-20020a17090a1f4600b00202c0464732ls5399373pjy.1.-pod-canary-gmail; Mon, 19 Sep 2022 06:35:04 -0700 (PDT) X-Received: by 2002:a17:902:6943:b0:178:4751:a76b with SMTP id k3-20020a170902694300b001784751a76bmr12668807plt.37.1663594503984; Mon, 19 Sep 2022 06:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663594503; cv=none; d=google.com; s=arc-20160816; b=P15m4aU31pSGKSL3JvXU2Cn12J0bB79NBi1HpLzx88hEzY5CEZs4hTRUbQL9+0FXL8 i7nmwzK+oUPtCxoa7nYA3WxbtuKTlLy06Pw3wsR7wTYFE31tKVEvMx606fzQGzra0IS0 q8znRTOx9No/ZY8568YXkcyaACyCSBZMDmoy4RCHXoeoms27Jwg6MQfzQhlLkv1Anmdz Y4PcmpiUVL46t9HN3lJvirM+LXQyQAHhfHdMFXtqfSrwuZNILi5We2t6oM/D+OvVzvq7 b1wJ2BKrhJK7fwci1ZIftr/s74P42iz2Ijf/Oz+Wvtn6cN+bWXuww4+wZfIKMN82BqGd Zi3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version; bh=Yqc7QaGAgXcxj4DbWF+iWxCikMr6guMPUKi8N/f7fr8=; b=wdf7d1oM69S97SsXt+Z/S8ChfRzQ9Yf5zctgtGXQZ8XbB9jKxSrjBOsNp7p//P8MPr dl4MlfolOdvBI/dwcNBmBUvTRQA3Vla72x7CSnLb4HE3mMGpJphR6zy/JiLS+lORJjrT ak3a0Gu3DvNJvAHeHTYR294b0I7DolNAOsiIiC0pUpJLKofX8l4XGPglW04z29OQUaU/ yrinHiKV6PVNtaOa7WHrR2Mt5KVn51kt5k6m9cghJ1K0XMoMboKjxWSOTwwvmzdgJcZR Xm45ko3omOh55guD66IL2D6LEQZZugzx9JNt9h0utzxuJvNSigJyyAeuPGYlujDp1aDN 141g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.181 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com. [209.85.128.181]) by gmr-mx.google.com with ESMTPS id ru3-20020a17090b2bc300b0020030aac781si344072pjb.1.2022.09.19.06.35.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Sep 2022 06:35:03 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.181 as permitted sender) client-ip=209.85.128.181; Original-Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-349c4310cf7so173878157b3.3 for ; Mon, 19 Sep 2022 06:35:03 -0700 (PDT) X-Received: by 2002:a81:92d5:0:b0:348:89f6:5451 with SMTP id j204-20020a8192d5000000b0034889f65451mr14586429ywg.150.1663594502574; Mon, 19 Sep 2022 06:35:02 -0700 (PDT) In-Reply-To: <87czbrfrzr.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.181 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31408 Archived-At: --0000000000006056ee05e907c799 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Den m=C3=A5n 19 sep. 2022 14:51Albert Krewinkel skrev: > > BPJ 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 =3D {}}) > > 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 =3D no extensions and no extensions in string =3D 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%40zeitkra= ut.de > . > --=20 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 e= mail 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%40ma= il.gmail.com. --0000000000006056ee05e907c799 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Den m=C3=A5n 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 i= n
> the docu) would be much appreciated!

Extensions have to be passed as part of the format string, e.g.,

=C2=A0 =C2=A0 pandoc.read(source, 'markdown-tex_math_dollars')

I'm not entirely happy with this, as it means that any extensions passe= d
via a ReaderOptions object will be ignored.

=C2=A0 =C2=A0 -- this may seem like it should disable all extensions,
=C2=A0 =C2=A0 -- but the ReaderOptions `extensions` field is ignored.
=C2=A0 =C2=A0 -- The default 'markdown' extensions will be used ins= tead.
=C2=A0 =C2=A0 pandoc.read(src, 'markdown', {extensions =3D {}})

Ideas to improve this would be most welcome.

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



--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe=C2=A0 e836 388d c0b2 1f63 1124

--
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 pandoc-discuss+unsubscribe@googlegroups.= com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-disc= uss/87czbrfrzr.fsf%40zeitkraut.de.

--
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 view this discussion on the web visit https://gro= ups.google.com/d/msgid/pandoc-discuss/CADAJKhApJjnCMghJ61rg6H2U9_zOP3Q%3DRJ= xHc9E2dFUH0Py%2BSg%40mail.gmail.com.
--0000000000006056ee05e907c799--