From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32587 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ThomasH Newsgroups: gmane.text.pandoc Subject: Lua Filter: Get to parent of current element? Date: Wed, 10 May 2023 06:02:18 -0700 (PDT) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5880_1164464697.1683723738883" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1049"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCOJJAXZ7EPBBXFL52RAMGQE7JQ4BEI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed May 10 15:02:24 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f55.google.com ([209.85.210.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pwjSZ-00005H-UB for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 10 May 2023 15:02:23 +0200 Original-Received: by mail-ot1-f55.google.com with SMTP id 46e09a7af769-6ab14081926sf1742816a34.0 for ; Wed, 10 May 2023 06:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1683723743; x=1686315743; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=5f80MSQ1iDwbklupnd6sQdW5dvwcxVm1T0du0CPzqyA=; b=DfkeZvsZdIxIPoE49zGIYnIxc+Ae43+J33/TwrI1CthxcqPTnPF9bO443kKbMvPhWE wu9xKqNhnKSgU2/73lBWz00ZmJrZRoxwdMPLstbr8l44f9diTTm3D4wqDQGMOPHepSC/ fq1KoWV9KgsSsT/PeMvu8rku4bhHTInLMIfQtKWlZGTxyg3MOemI52649KvTqnWmNvkH 8NImrFbGhy298upvTnnPkYZGnQ8oTrh2VSPeo7NI0ZPAlWI0Ro/L2nP7p6LqIKzpRaPO jeH5sQQSpJNWknzu27oZ/yAnK1q8Q3P+jvJe5H7gS3zY8Q0rf2Srm4U+ItjRnzpFM4z4 m5wA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683723743; x=1686315743; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=5f80MSQ1iDwbklupnd6sQdW5dvwcxVm1T0du0CPzqyA=; b=N2gRnVAGyZo6ZqRcKaJm2U/ykAGibr4vXtA/zk+NdBgQzSZlSa7K6nO/GcwOmNKpj+ Y5N6RHAdDvKsj27PmyA6P/WjsHDEtbawMyLdQg8ikyoaxQu1myUXe4igtaj8E4aLNAST kwSr75ZIYHmZUuYjkEX/xri8pIZwMENkTRP1bdq0e6sJ6T1YltaZ6ZXi5ywWBsNdFHPB FoSAudon0ou3K21LwSxAdsk+pDhJNur0H8dPxULCQgGf7BlfnIxCL9fssQMiCBEsCZ3p tChP7V4AdhoK1cePLYRWwj/2DxcjZrF7HAqYz20b/+0HQPRs6+u3AZHBlVO4PbFKWphF B8Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683723743; x=1686315743; 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-sender:mime-version:subject:message-id:to:from:date :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=5f80MSQ1iDwbklupnd6sQdW5dvwcxVm1T0du0CPzqyA=; b=NsPPE3YRrzuhuaWk1xlyJ+sm/uUaMDVEiMfC5A3ZkIhLLG+L97etMztxB+/hliVv6R 3xPbHIsyjsTeQhmWEU+BIno7VQ3ytE0AdZ6sfU+Jf19j5bYDQKOQ6YogrZcq0P9SW8BX ndiO1vUF08V0zIwGLwtOkJRNtBs2zQKb1aFuut//5nUEuWEYoYd3wYvaCegPppVKemFY 1w0OsDdnv65r7+TNpPwIiC9T3gYe3LGn7VGZ9zFN1G21FWB8OXWpHx5/0kX6Zq+IGazs 8lBe6/WdpuqYdDqc6sdvz1j/dv3n27GP9OIiegynnJ50mxLMYisHeMkAhggXV+Kxqiud Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDxIaBmkD470OOeYBhfy3WxbpAJdS1cOD9cWyhfu7zuD38gFzHzZ UgJ83IziDou05dx/RJYgL68= X-Google-Smtp-Source: ACHHUZ4klf2kTlR4KlDYonfldZccodcHw1V4h4pVqMdbhpBsTr7z8wgwcdgKwqWvAVywaidfDq1MVA== X-Received: by 2002:a9d:7f96:0:b0:6a5:e464:f0a0 with SMTP id t22-20020a9d7f96000000b006a5e464f0a0mr1639716otp.7.1683723742797; Wed, 10 May 2023 06:02:22 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:5a9c:b0:194:31f9:bdd4 with SMTP id dt28-20020a0568705a9c00b0019431f9bdd4ls799633oab.0.-pod-prod-08-us; Wed, 10 May 2023 06:02:20 -0700 (PDT) X-Received: by 2002:aca:348b:0:b0:38e:277b:747f with SMTP id b133-20020aca348b000000b0038e277b747fmr1638914oia.4.1683723739405; Wed, 10 May 2023 06:02:19 -0700 (PDT) X-Original-Sender: therch-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:32587 Archived-At: ------=_Part_5880_1164464697.1683723738883 Content-Type: multipart/alternative; boundary="----=_Part_5881_450043468.1683723738883" ------=_Part_5881_450043468.1683723738883 Content-Type: text/plain; charset="UTF-8" Hi, is there a way to get to the parent in the Pandoc AST from the current element in a Lua filter? I would like to distinguish treatment of elements depending on their context in the syntax tree, e.g. handle a 'span' element differently if it is a child of a 'cell' element in a table. Thanks, T. -- 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/b4305519-9dbf-4254-a3d7-7b9e1dab9d6en%40googlegroups.com. ------=_Part_5881_450043468.1683723738883 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

is there a way to get to the parent in = the Pandoc AST from the current element in a Lua filter?
I would = like to distinguish treatment of elements depending on their context in the= syntax tree, e.g. handle a 'span' element differently if it is a child of = a 'cell' element in a table.

Thanks, T.

--
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/b4305519-9dbf-4254-a3d7-7b9e1dab9d6en%40googlegroups.= com.
------=_Part_5881_450043468.1683723738883-- ------=_Part_5880_1164464697.1683723738883--