From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29256 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'Daniel Gnoutcheff' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: FIguring out pandoc AST and types Date: Fri, 17 Sep 2021 15:25:47 -0400 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: text/plain; charset="UTF-8"; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14799"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCS5DCFL2ANBBPWXSOFAMGQECDEXKYI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Sep 17 21:25:53 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pg1-f186.google.com ([209.85.215.186]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mRJUf-0003c5-6e for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 17 Sep 2021 21:25:53 +0200 Original-Received: by mail-pg1-f186.google.com with SMTP id w2-20020a63fb42000000b00255da18df0csf8591951pgj.9 for ; Fri, 17 Sep 2021 12:25:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631906751; cv=pass; d=google.com; s=arc-20160816; b=API969gw7mlxNsjxmuSqv5toVoLHiUVry3zh+zJTAKCs7mZtQhwNqeG5DCuyYfSvdJ VMpXK/AbK9t8aNLOMEgSIJSa+yYd+uL7imKzb6QBHW4uisklRyvFMjrLi1STHiS6pFpl xNjxgRrQtj50zr0GDeOMTHbrODrKRhgPzCVjm+gUq2+RttYmDPIAdu7qOgZL06RJIyKz eJtjUhSNvyFd3/StEDSCvca6iolLnvkr6Tklj8qr0ioJmw3/zdGBWpDIw7mFGvu07WXt wLyTMdqoteiQbU1edjMqhe1uxf1CLJuWksgrMXdv+3ZeEkAXlfBd2AlYi0Pt7hD2Xi8s kHQw== 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:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:to:dkim-signature; bh=STrcjDfLcHEOXuMhXq/mNEYFEckHqkpfkIUgY+q2WPI=; b=T5agOXR9h4ITCV5y/mRx/f3u5QWzG6JaaioacYHU8PX8h4Pb04juSNy5Jd+nc4zl0v WZr9vB9xqojRxPawTicrM0GenYJ4PFOBmPPmcHQ1x+5yH6qGqhAlfqhio6yHNW+BoMkC ZXaq4Bbr5vLNQD0qSxtfZ64VQk+KK6MLe5f0qbm4HqJH28E9WiMpEhCXOjEPk/mKElUE PGKo6H66N0k4wPqi+Wze2Hd7E5YjhBfxvtTYOBXrvAi8CXxCJjRjLjb8Nz6/Ts0zHdaU VWGouluEWDd3TYwJsY90mdTrMOOp/gmYyHV68DaoStknvUjXZNvlRmA9UPqOcnvMPCcm 6q+Q== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@softwarefreedom.org header.s=dkim header.b=qj5Qqlw7; spf=pass (google.com: domain of gnoutchd-rbQqYLFhARYurNyw8EiOWEB+6BGkLq7r@public.gmane.org designates 160.39.60.15 as permitted sender) smtp.mailfrom=gnoutchd-rbQqYLFhARYurNyw8EiOWEB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=softwarefreedom.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=to:references:from:subject:message-id:date:user-agent:mime-version :in-reply-to:content-language: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=STrcjDfLcHEOXuMhXq/mNEYFEckHqkpfkIUgY+q2WPI=; b=ZDj6cedYSNn0Sb3Mf36Ch3ojTK4xoF81Rj9gYCi8yHYwOp8NGMNx4TVL2vOWsGcnil iBgzKhAF4UrNp1Kpx003OrJdZES2YXUpLRv4Ck+3XRv69zwjzyORMsCaZ0t6eIfgk9Xb DBArXB81RvP+zCBF9a519oQ1ljJqve+wy9XKqjHTem8WtLEIJS19XiA2Bi2QdkZzJf3E RO0R/dq4YQfmgEm4tGINToDUsploBbtgK8QjVDfLwk38+qCBTMC9eVota/8FHLSNKiaU rafFEaQ5qy5so9k5tkMlXKMejr6lfxOCU7hLl4xu2SNQcl+knSF5uXM9q4M4ySSgmLXq A81g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:to:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :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=STrcjDfLcHEOXuMhXq/mNEYFEckHqkpfkIUgY+q2WPI=; b=c/ZtPE0ul3dO+mpnV+ZMbQCNUvGCJ+eoE/+qDS1pY0ESFDF7BkElmJ/zmeCGKkuFOs 00X8iyrM42A6GwQ3jMvQ4/gvq4rt+7Kz/OF2H2RIkoKVQ9FcD24S5NHDbYFXRlXjZweP XOpSZ+4UdoQWmVXtw9+G2vZ1n8JpdcOTbFbeTzlUsDV/ax1wSZfiO0X50d2Jq071P9e2 5JsRe358UTeiA2OPF8pDW3ZC9lt9j2Ftr+X3LhVTyE1+yO0/Q4NEyuHAudbOoSq24kah XIMwJxYX8tA2eMiyEhw5kWE9wd2bJZnRuP7T2vvB4qioJguJtOw3Z9ui3thKqqSoPHKh Z X-Gm-Message-State: AOAM532sIhIUohgozNJ9QpE631jiR1kyMgWmgWs+bAIfgJcjabAuBvZm op5r2Og9OMccKpEX2U9sRto= X-Google-Smtp-Source: ABdhPJwB/20d6Mgt8hV85qZgwOyaiDIIr2nPBFC5VXrcfUMSBhwU+ySDH+TbXok5g9Pl58QE8vVkYQ== X-Received: by 2002:a17:902:8488:b029:129:97e8:16e7 with SMTP id c8-20020a1709028488b029012997e816e7mr10859777plo.39.1631906751609; Fri, 17 Sep 2021 12:25:51 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6a00:b54:: with SMTP id p20ls3418690pfo.4.gmail; Fri, 17 Sep 2021 12:25:49 -0700 (PDT) X-Received: by 2002:a62:b615:0:b0:3f9:1c5a:2671 with SMTP id j21-20020a62b615000000b003f91c5a2671mr12120498pff.10.1631906749747; Fri, 17 Sep 2021 12:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631906749; cv=none; d=google.com; s=arc-20160816; b=BQHz2R4c1MfDtKHiBgwdZ9NiywpIcj7c5xbnwEOq8OnYXr7EVebIomjrePSk5y8IEM aMRa/jt+SLXLYgiozTqQNTi0h/Yv34ySuR2YVr7BiygviiNAboErGUh8zR259xUHgD6l nLMyLMMSSzYBlmNrjdiGN0o7DxVzC9nbx8MZT9zXRM1aMdBVVPofvdZGXbUj3jOujMcw HtJbXpuXfvvXma3sOs4Sr7ynNk2/1zEZ8VhOjrhilRH7GVVlyEczlc7fvXezCuadGjja ixcbqDEFwFhKX9j2tnKo4x7A9q92+j4bIvjRA2x6KPZlJqfEM/v0YYGgSM+5I1MfXMr5 Q3Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:subject:from:references:to :dkim-signature; bh=sluycKK8Dn9cB9JhxVoWOxpNrnlcmG5Xglxw0Qs5ipk=; b=b48HWGTIKymhmiRLrSzrsOIT5n2/+ayVzMS/q01bh1z3/PlO2xtWqo9u1CC1EWtdvk z/hKSdXJZSmSBI7OU5Yfq0QlyNGe+M/TStjbdwAruyCL8rZsfuHZHmi8ITYDZVPgmqzd 6IUOvRGkwxU87xCWsF0YUgGR8onKjpKMOYY/xtuYEIQDFFF8nPD1GQOTcAO9AB7/i3Xu DyU2vImqExmeg9nwOAgLk8zXraWv7sH7SF2agUpi/3f2NrHXsRt9038Ial4VtYoUCIof ZumNSPFZdlimwgU7oEQdeKdWD90ozge2ZRuxb5DS2MAMS2cp2/vvoC/Cr7/ubRAnA6kB AnQw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@softwarefreedom.org header.s=dkim header.b=qj5Qqlw7; spf=pass (google.com: domain of gnoutchd-rbQqYLFhARYurNyw8EiOWEB+6BGkLq7r@public.gmane.org designates 160.39.60.15 as permitted sender) smtp.mailfrom=gnoutchd-rbQqYLFhARYurNyw8EiOWEB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=softwarefreedom.org Original-Received: from mx.sflc.info (moglen4.apt.columbia.edu. [160.39.60.15]) by gmr-mx.google.com with ESMTPS id 136si1108162pfz.2.2021.09.17.12.25.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 12:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of gnoutchd-rbQqYLFhARYurNyw8EiOWEB+6BGkLq7r@public.gmane.org designates 160.39.60.15 as permitted sender) client-ip=160.39.60.15; Original-Received: from [10.65.65.103] (onering.p.sflc.info [10.65.65.103]) by mx.sflc.info (Postfix) with ESMTPSA id D0049C1F520 for ; Fri, 17 Sep 2021 15:25:47 -0400 (EDT) In-Reply-To: <4b3e7960-d144-44e0-9b48-a044db45f885n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Content-Language: en-US X-Original-Sender: gnoutchd-rbQqYLFhARYurNyw8EiOWEB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@softwarefreedom.org header.s=dkim header.b=qj5Qqlw7; spf=pass (google.com: domain of gnoutchd-rbQqYLFhARYurNyw8EiOWEB+6BGkLq7r@public.gmane.org designates 160.39.60.15 as permitted sender) smtp.mailfrom=gnoutchd-rbQqYLFhARYurNyw8EiOWEB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=softwarefreedom.org X-Original-From: Daniel Gnoutcheff 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:29256 Archived-At: 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.