From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29259 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: FIguring out pandoc AST and types Date: Sat, 18 Sep 2021 12:53:15 +0200 Message-ID: References: <4bd5ecbc-bd1d-442a-9558-6724174f77fcn@googlegroups.com> <3a59eb3c-352f-49f4-89f8-465aa7e86750n@googlegroups.com> <68431aed-736c-425d-8745-14ffdc5468a9n@googlegroups.com> <4b3e7960-d144-44e0-9b48-a044db45f885n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004295ca05cc42db0d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34127"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBI4KS6FAMGQEWBDWT6I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Sep 18 12:53:26 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f61.google.com ([209.85.128.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mRXyH-0008iH-Ue for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 18 Sep 2021 12:53:25 +0200 Original-Received: by mail-wm1-f61.google.com with SMTP id g18-20020a1c4e12000000b002fa970d2d8dsf2822855wmh.0 for ; Sat, 18 Sep 2021 03:53:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631962405; cv=pass; d=google.com; s=arc-20160816; b=IfNZiNxIeRaUiJ3eLzjFl5jSfn0wQRUPGdZ62p+mZoUTp8upOVAHH8c0UW0i7aUObf f2U8teZpEGT672HVb1pmAM2mFqCqDKHKTHjY8x3G4lG4CubsW/aJWkp05z6rD2/BG53D 8rvNiAjZ/l3wig+OChZwFq+Y5JZLEzcpKdSj/6h8XAW1WcetuCZBy9ilmmXk4YPzvk57 bR7Xy+AwZ/hSEAWrARSHw5RB8aU1sKlE4v1++VCI2Rlyzjzy5QdCD9lI6scRsvTGuIf2 hrGIf2xDEg/a9Mo86iDgzVFp8AiP8KNAakzbmo9UDYIODFkaJ7DWEm1Dd8O6Hd2OKziq qOdQ== 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=sfmdwKxrn9G8o3QvCHdGNCQdBmKFhYooQtkV04XVrt8=; b=O/sX4F/gjsxt0NYb5wLPTyWyNWYfHTg1Um2ti8Xs7sDS5Zaonf4/O1kPD8HIBYoOK0 WCX94YWZdhDrSs+aIQZjjMzD0f0Z2NXSffWB6reGQO47pV+G8o6YG2+c31x2/vZUoHNa Xbd4pKkKCvCb+IB0nkOhs1ygUCmOLcvM90NiHUkn/oFNqIRDLO53EM+MHEKWktGPceuF paJlaQymOxxUTt0hwgExGm4BmUtCbOL31hVIN/9IGLVUDX/INMyGid72Raj4IFzdJCw5 XK4/hP1tS5YOpJKQvKVtGlio1zzQQfa4k6T1GFpsDVvPgA+9iWswAcUJ+rMh7rx7F73c YkWg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mnCrIVMK; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::136 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=20210112; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=sfmdwKxrn9G8o3QvCHdGNCQdBmKFhYooQtkV04XVrt8=; b=AmSyF7DtmxfHcc0Mppf0baxR6vXw93NR0QWkJpOfDpL74rP0R1JU0ubR8Q6nkPPEUG QvdLy5+5BNgrWK/U5Xy3SCzqZSWDA+Clj0QTWBalvsOJuUV274DRFOmMLL2bMqc/jZO1 6vQTGvfGCGObP1aJxA1QZO8no5WuF6CmDuQxDQgMOXuV40ujE5fUrx4mYi8wysx4VYLS iBgLEQi3JnrJHVcVDa+I7qRlyq65TyDxvTv//WDE/1vpMt4MA89M88gSnoGOk8HKlQDV CglaFkUVip4zRoKLeHKe3Ymi1bWbYT4rBnH4yRoi/RlJHcFpSN7clt1lg2Bf6KBeDrzv 0bMw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=sfmdwKxrn9G8o3QvCHdGNCQdBmKFhYooQtkV04XVrt8=; b=l8uTZgTAb5rRbZQASn2aEsRo/ifDIZu4isVbIKsrFCwEit7emno4iKaGUbna5f7QN+ X0cpHbSG+5qxGStplBenD5rTBrFlDKbLV7GsBHoP5EMN4AyrkaSNbshxM67t+obT8GFR h+1lsZHEzDp+qHhzlhGuf2I/mF7GB1FzEDS70E67UJDR1wlWbgSz4u1T40VOxCSnGbtL L/atwxbs2jYbGbjEzzvxWY2UOCUQ4V+/8nvIGCBpj1neLv1hT9HQZWQyPhaQGtlXukaO ZLJqv6ZPfsC8vWHDkM4ZkS2rC5rRGSYnDYvCXL9c849SfpCbpg7YOHu0qgwLNZadYO4k 5h7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to: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 :list-subscribe:list-unsubscribe; bh=sfmdwKxrn9G8o3QvCHdGNCQdBmKFhYooQtkV04XVrt8=; b=NObdbolLLTsbdOtzS1Eu0ll6eesuoeYdV1Jhbr+nAQakJ4K9JtXtqFnDdQv/31lp9L 5XDyI2NGF6qF02bXdeWn3F2d3a9aqA7mOniWTK4khtM800qOx6lqspoMt4HgnpPsoyck HURMUxocULaW1O/fkQnbmZo3aSoIL9kCFwMgelhmhclVuJ93yRJ+tiauahqhsRHle5W6 MTEiZxGsTNO6XkdV6Hq52mZCARJ0ku7pdYcA0YL6Se3vbEPwI7a5wokVPPX76oksnUwM U0SBo7CK86Wvk3m3m0BnhKdCTOjOs6rfWeAAn+iFGutQWsiq2yDwoBTtxZEQxtO8+/wP MRgg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531ThUYAVQrgguuHrk2S+NRwzq/5hDV4NjPztoYZOg4sBbOlJLUG i8GBsnAgtOlrAactfweyC5E= X-Google-Smtp-Source: ABdhPJx63mBQdHZlUJ4ODbHS86cWztYJbXrbf3M110mESzUKKR6vRifb2qcmYGP0gLZwki1cfT1nSA== X-Received: by 2002:adf:fac7:: with SMTP id a7mr17165175wrs.341.1631962405039; Sat, 18 Sep 2021 03:53:25 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:adf:aacd:: with SMTP id i13ls3018544wrc.3.gmail; Sat, 18 Sep 2021 03:53:22 -0700 (PDT) X-Received: by 2002:adf:e5c5:: with SMTP id a5mr17017106wrn.290.1631962402619; Sat, 18 Sep 2021 03:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631962402; cv=none; d=google.com; s=arc-20160816; b=GX2g0R5W1Ix8pRxTsNpvdiJR4nwjhsmWX/ofHeZ4mkL/dCAMk4Int7GIDUHB2QuTEM p+TKvXeG+zAjHEqV2TbJNPyujaT3GREh9KnScWGVuZUhA9iAlVZ+qyW6TS5ZpTBm5t2d /3Cwk7yqGr7wvujDWgdesrf+FB3agqp2MzoWfCvBiZIlLeL4DVl8zda0sb4tneSEqJyW s0UNjsHYEgkdHTCljm0xSnBmk6BPrNZ6CW7npaP1SuCMM0EzalVDIYVqu+v6eNgXuqU2 QTiQYAikBrBugEamRW9aqz/nR+DdpAud4qksR9K3uyKmi0bzQMox/gbMoLk/a6GX0eIp Rd5Q== 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=xJY9XvyvILPDK+gGgXCBmV5bCq6uc5EFCmD5BXE9S30=; b=Etp84yQhn/UK0NkDzUFOKOQ0GsKdUxgAAmVwjPoFBhxkNN92hrK/9uqUKSQTdCsc5n TrtFrhoym7X8d153Td5dNIkJGJr3I3d8fqun9y9pmQa38qQAXFxtnWhvgTXZZvekUNxq jU4fo752uFq+OeqBdMjIQi64up94WHjmL1ykIlt25qBjuoLNx5wEz3kY7VPhiKkC89T9 xuAxa5/eOlEgScWMNVwa+1h918nWREfTOTlHAGNyT2CbJKcx1WAj4I9c8H0Ke5kxv9v/ FD+zUcPuaFpqb8+/74KruVY8+LflzhR/uE4VRG+6Yw9HZ/xa83aCKPUcXpIXOsUiiguC 0daA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mnCrIVMK; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::136 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-lf1-x136.google.com (mail-lf1-x136.google.com. [2a00:1450:4864:20::136]) by gmr-mx.google.com with ESMTPS id 130si962745wme.1.2021.09.18.03.53.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Sep 2021 03:53:22 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::136 as permitted sender) client-ip=2a00:1450:4864:20::136; Original-Received: by mail-lf1-x136.google.com with SMTP id x27so44016351lfu.5 for ; Sat, 18 Sep 2021 03:53:22 -0700 (PDT) X-Received: by 2002:a19:f00d:: with SMTP id p13mr12305080lfc.239.1631962402034; Sat, 18 Sep 2021 03:53:22 -0700 (PDT) In-Reply-To: X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mnCrIVMK; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::136 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:29259 Archived-At: --0000000000004295ca05cc42db0d Content-Type: text/plain; charset="UTF-8" The OP might also want to look at the type reference for Lua filters which if I am not mistaken corresponds closely to the Haskell types. (I don't know Haskell but at least the names/tags correspond closely.) https://pandoc.org/lua-filters.html#lua-type-reference Den fre 17 sep. 2021 21:26'Daniel Gnoutcheff' via pandoc-discuss < pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> skrev: > On 9/17/21 12:18 AM, Harsh Donga wrote: > > Sorry to bother you, > > > > I could read in the documentation that Attr stores (identifier, classes, > > key-value pairs) > > What do these actually mean? can you share an example? > > The AST corresponds closely to Pandoc's Markdown dialect, so a good way > to learn about an AST type is to study the User's Manual sections that > document the corresponding Markdown features. You may have noticed that > the Attr type is used by the Header, CodeBlock, Div, Code, Link, Image, > and Span data constructors. In Pandoc's Markdown, headings, code > blocks, div blocks, code inlines, links, images, and spans all can have > "attributes". The relevant manual sections discuss their syntax and how > they are used (or ignored) by writers: > > - > - > - > - > - > - > > I would just add that Pandoc's HTML writer converts Attr values into > HTML tag attributes, including those classes and key-value pairs that > Pandoc does not itself recognize. Attributes and classes that mean > nothing to Pandoc can become meaningful if, for example, you provide a > custom template with CSS or JavaScript that does something with them. > > HTH! > > Later, > Daniel G. > > -- > 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/b467908f-a4ce-35b9-ba30-ef55e9e70958%40softwarefreedom.org > . > -- 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/CADAJKhDN5x1AqBuEehnRVO4ju_fjdwmu6vVuimSXohbnFqmQgA%40mail.gmail.com. --0000000000004295ca05cc42db0d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The OP might also want to look at the type reference for = Lua filters which if I am not mistaken corresponds closely to the Haskell t= ypes. (I don't know Haskell but at least the names/tags correspond clos= ely.)


Den fre 17 sep. 2021 21:26'Daniel G= noutcheff' via pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> skrev:
On 9/17/21 12:18 AM, Harsh Donga wrote:
> Sorry to bother you,
>
> I could read in the documentation that Attr stores (identifier, classe= s,
> key-value pairs)
> What do these actually mean? can you share an example?

The AST corresponds closely to Pandoc's Markdown dialect, so a good way=
to learn about an AST type is to study the User's Manual sections that =
document the corresponding Markdown features.=C2=A0 You may have noticed th= at
the Attr type is used by the Header, CodeBlock, Div, Code, Link, Image, and Span data constructors.=C2=A0 In Pandoc's Markdown, headings, code =
blocks, div blocks, code inlines, links, images, and spans all can have "attributes".=C2=A0 The relevant manual sections discuss their sy= ntax and how
they are used (or ignored) by writers:

- <https://pandoc.org/MANUAL= .html#extension-header_attributes>
- <https://pandoc.org/M= ANUAL.html#extension-fenced_code_attributes>
- <https://pandoc.org/MANUAL.html= #extension-fenced_divs>
- <https://pandoc.org/M= ANUAL.html#extension-inline_code_attributes>
- <https://pandoc.org/MANUAL.h= tml#extension-link_attributes>
- <https://pandoc.org/MANUAL.h= tml#extension-bracketed_spans>

I would just add that Pandoc's HTML writer converts Attr values into HTML tag attributes, including those classes and key-value pairs that
Pandoc does not itself recognize.=C2=A0 Attributes and classes that mean nothing to Pandoc can become meaningful if, for example, you provide a
custom template with CSS or JavaScript that does something with them.

HTH!

Later,
Daniel G.

--
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.g= oogle.com/d/msgid/pandoc-discuss/b467908f-a4ce-35b9-ba30-ef55e9e70958%40sof= twarefreedom.org.

--
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://groups.= google.com/d/msgid/pandoc-discuss/CADAJKhDN5x1AqBuEehnRVO4ju_fjdwmu6vVuimSX= ohbnFqmQgA%40mail.gmail.com.
--0000000000004295ca05cc42db0d--