From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32540 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Lua: pandoc.read() with current reader options Date: Sat, 6 May 2023 16:51:26 +0200 Message-ID: References: <87mt58df5s.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000cf90b205fb078a67" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37857"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRB6GS3GRAMGQE4UVGNLY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat May 06 16:51:40 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yb1-f187.google.com ([209.85.219.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pvJG8-0009j0-BA for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 06 May 2023 16:51:40 +0200 Original-Received: by mail-yb1-f187.google.com with SMTP id 3f1490d57ef6-b9a7d92d0f7sf5272030276.1 for ; Sat, 06 May 2023 07:51:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683384699; cv=pass; d=google.com; s=arc-20160816; b=r6XUUoVincLfVl6C2EtSMusZa4FIxFadp14HhCjbnCwBGyDPxs4jLKjJQWZecuCbph dv1v8Uv/TEiX3FHHtfaQh0YPBcKMTf70yGAVoEvzeiA6uD/IMagywj9u5egeXjuRjh5C qI8jIziSOMhK5Cc3ZCijiTT3AxCulZNmhaYn02PQsIt/CPJxMN590TZwcNXhGj0lmpbB 0zvjlRGqaHRYbGrQH5mTYh/g+hsIxqZZwWVs85nJzAn0/O1/icBprJGa0EpePoAQIZOz Tc1VOa1CY4r4mJ3H5jEF7mCDV3/9A9VfrmGAndedP1kqJxfmnk2ITeH1S0IMiM0nAMp3 dWLQ== 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:reply-to:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=uSfeXgRUTUsFjGJ2E7fOlNrvWvM9KoHfirUbF0MRofU=; b=XeVJ8J3n4AqBbAi8Tntl+nkuxxikvqC5Hlv1/ylC3vUDJtvja2M/D76HN4r6nVfnOW zRZqqrsJwIzYS2H47ZP7o2UoYo6OIcnVmtzcgVQ8C8md7wsShLcYSDl4xU/OrPGcHlzk Yfxen17jYiDFWsVzvqs3RUJjLdgWj/uV7Iub6O/UMvmDq4nIm++a1GLCbQO5TJwOJOrU 53bTVDW2pRbB3QALgUvn5HFOmy1eL6O0CUcM6IXD8g1Ngl48lyQqu09Aj1U/woEwsyEe T1nWWOxBnt9xR6MpF4cx31ZxYJQCsPZMKDSCMgyLlFBJw/pVRjYcmbnUmuxVKVnPd7kq zBwg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=U+Njs5J9; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b2d as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1683384699; x=1685976699; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version:sender :from:to:cc:subject:date:message-id:reply-to; bh=uSfeXgRUTUsFjGJ2E7fOlNrvWvM9KoHfirUbF0MRofU=; b=ToFdA6bkutOiD9KgwprOcdV516QO5z6LFr3vWod5TX/9wzHXwoRhPugX2+VtmWaU3x 0+J6i4x9ikM8n96M4xgpILNKDGnRMPG/V8PW+6nuFWuv1bPOMsPpsvzEoSgybuD9G8Vs 19Vl9XCXcg/PkbBAr49NeiGCxzcvAEKWsVwx19+OFMYsya/U1vOOgbyoOKZuLwGaYn+v SbHXZ+CjUi43gvUaclLCFxcp2qpWf63mNQJzUawfxPmAoGOGY6C9CwPLPOvClRxjK48h IYQgyxLqOhh8PX9aczZAS/MgrmdUr3Rv+//2LYJt9tWKptHuBgAAQsilX2gmFB7TKrNh DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683384699; x=1685976699; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=uSfeXgRUTUsFjGJ2E7fOlNrvWvM9KoHfirUbF0MRofU=; b=Ik+d1kIL08XEIsj4p8t03VtXzzvvFUwSxNe6uhCJetccOmQEqKT6YKPnUka62731uO CahRpXP9HsgfmrnIUb8y+Ld8irb5u2W8jYOCTpmbkUkct6sn6L5XaS01QtrEfd2A+uwY sxItwfOmRMqALNAUl7nRkRGPq0EJwvHdDddfeZWX7xgYBeCXIxH3q6L0HU4jDFV7RLoL htHJuvhp4WkfLr/vG8mPUGuipU4d/LoZKdSEejh5SQV/hyesTAbQy2S9GlZiFQcPNPBT nZpeRhjw6BAdzC0pJZqCVVccBAKb2RAo/zmzQtXtHBqkDYsX0TpB5l7cpRG1tQBy387s 0ogw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683384699; x=1685976699; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=uSfeXgRUTUsFjGJ2E7fOlNrvWvM9KoHfirUbF0MRofU=; b=TEUiEKhL4d69Q0wd3SuUAAaesAbrkpm2LF4NAJFrZ1AsmTxPUzo7Dhw1fMiMKjCfc3 KUJmyFrVPn4vtJpuSNdS7uzfLMBV1ooRQjTe/XB0eZQc1okrrsgjT94nAIkF+/8kmIwa fcqbRYeaElHI+Qn7isRYwMP3MP22Tibv5A7mUfjpS/GVrAO+s3N9LaMiJLV3sPLop3Tz 0lrJVcxHpDe8KyHYT44TdbdwsQHOTcjjQFfT/9RCl/PbKFVCenoNXwcE74AMa6t1EDkE GXSluV Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDxCCipsSZdJBX6p0ryKAjNSozY/aLIVk6CcA679AyaAyOvSPvXI +0w+i2oKeZenr5Bgg91CY1c= X-Google-Smtp-Source: ACHHUZ6J2FdXt0IOlkPtNO806WyIRSO/GUkZF/lgUcyjfnunSrIvPXi2Fmz9Nwfw01r/d3Tj7tTjSQ== X-Received: by 2002:a25:1dc2:0:b0:b9a:6d85:8ee with SMTP id d185-20020a251dc2000000b00b9a6d8508eemr2195848ybd.2.1683384699213; Sat, 06 May 2023 07:51:39 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:690c:324a:b0:55d:d8ed:a0d8 with SMTP id fg10-20020a05690c324a00b0055dd8eda0d8ls66804ywb.2.-pod-prod-gmail; Sat, 06 May 2023 07:51:36 -0700 (PDT) X-Received: by 2002:a81:4d88:0:b0:55a:613d:4228 with SMTP id a130-20020a814d88000000b0055a613d4228mr7120570ywb.11.1683384696207; Sat, 06 May 2023 07:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683384696; cv=none; d=google.com; s=arc-20160816; b=H650al3agoScqCXWEJokuAu2mDh2mE6VH86/nAWlrOs1CNUSlKJN+aQjwf/q10M3bg VL/mwmj0LqdsnHvHQUKzSQwM/8BvW5odDd+cD48TADRqOeIrottzOdp/Wce3RNdp16bf T1xTR8YcUOq3GgoHYjMvlPZb1yeWv+afHNIrSAAGyWMqYzPC15uEuKeFF0ik9VQV5dmA 4D16dWfse+see1P5oUdjoma674tPcdRpufnshKq6rC4pxI0aoi2adp0E3lNAH/Dqrnyp KNwl4698xq+RXodM8ZEBjhmfXHfBaJj8haQEX7YywWasE+WmhSamP2VBaPB3WfcRaAD1 UO7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=3TiHUPQPAwGqf+dUhvj0JLbadr4L9yRU+CLHXjWn29o=; b=yaCud+fQrDGQj8hMH6qQzFcrUEZnLTTm22bowyctjU7VO/GZfRxkFjCr6ygbwwQ6F9 h6EwollXgN60GHUUeX1tMi54PgahaxEw5z7GgfLPeQZk8UIoFpwF6KEGau2GDG8mz9yq S6b7xeaAVtEFQ1Tqj9SY7yOTYti+EDLxn+PMeyZ2+9bD96GqkuLIPXXsRlXhPb6eJ1Px K2TNDsA9/5ZaWALckB6ZleZgiyOIkljn7mzKIqd5mWP7IjBhMBHsfSdzUwx2GKjNvnlm mUgeYWQJvNPZNbikq0r9i6/n9LJpee19PmNblwC3C5zTyjFQEC1G/4UsC0kqbeOf7Cmw 5FEw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=U+Njs5J9; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b2d as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com. [2607:f8b0:4864:20::b2d]) by gmr-mx.google.com with ESMTPS id j11-20020a81920b000000b0055a18c30c56si310047ywg.4.2023.05.06.07.51.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 May 2023 07:51:36 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b2d as permitted sender) client-ip=2607:f8b0:4864:20::b2d; Original-Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-b9a6f17f2b6so18390701276.1 for ; Sat, 06 May 2023 07:51:36 -0700 (PDT) X-Received: by 2002:a25:6a45:0:b0:b9a:6a19:8153 with SMTP id f66-20020a256a45000000b00b9a6a198153mr4900074ybc.5.1683384695753; Sat, 06 May 2023 07:51:35 -0700 (PDT) In-Reply-To: <87mt58df5s.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=U+Njs5J9; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b2d as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE 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-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32540 Archived-At: --000000000000cf90b205fb078a67 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Is there any way to get the current input format in Lua? Den m=C3=A5n 20 feb. 2023 07:29Albert Krewinkel skrev: > > BPJ writes: > > > This one is for Albert I guess. > > > > Is it now possible to invoke `pandoc.read()` inside a filter and > > apply the reader options from the current invocation of `pandoc`? If > > so how? > > local flavor =3D { > format =3D 'markdown', > extensions =3D PANDOC_READER_OPTIONS.extensions > } > > function CodeBlock (cb) > return pandoc.read(cb.text, flavor, PANDOC_READER_OPTIONS).blocks > end > > With that, everything in code block will be parsed in exactly the same > way as the main input. > > Cheers! > > > -- > 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/87mt58df5s.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/CADAJKhC02NbUxS8Unumv58qTdoKHn8H7%3Dg%3D0z4iKvZLvMccq_w%40ma= il.gmail.com. --000000000000cf90b205fb078a67 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Is there any way to get the current input format in Lua?<= /div>
D= en m=C3=A5n 20 feb. 2023 07:29Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> skrev:
=

BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> This one is for Albert I guess.
>
> Is it now possible to invoke `pandoc.read()` inside a filter and
> apply the reader options from the current invocation of `pandoc`? If > so how?

=C2=A0 =C2=A0 local flavor =3D {
=C2=A0 =C2=A0 =C2=A0 format =3D 'markdown',
=C2=A0 =C2=A0 =C2=A0 extensions =3D PANDOC_READER_OPTIONS.extensions
=C2=A0 =C2=A0 }

=C2=A0 =C2=A0 function CodeBlock (cb)
=C2=A0 =C2=A0 =C2=A0 return pandoc.read(cb.text, flavor, PANDOC_READER_OPTI= ONS).blocks
=C2=A0 =C2=A0 end

With that, everything in code block will be parsed in exactly the same
way as the main input.

Cheers!


--
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/87mt58df5s.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/CADAJKhC02NbUxS8Unumv58qTdoKHn8H7%3Dg= %3D0z4iKvZLvMccq_w%40mail.gmail.com.
--000000000000cf90b205fb078a67--