From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/22092 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: EBkysko Newsgroups: gmane.text.pandoc Subject: Re: ignore section & content in output Date: Tue, 12 Feb 2019 17:13:42 -0800 (PST) Message-ID: References: <717bc9dc-b99a-4472-9965-1c84a737fc01@googlegroups.com> <5a59f103-d049-453e-b677-d85a2a2d3a76@googlegroups.com> <50ee8006-c909-4b7f-a81b-98d83c2a4aa9@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1233_2107241201.1550020422284" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="2281"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDW4B3GJ2UFBBR66RXRQKGQE56EFWBI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Feb 13 02:13:46 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ot1-f59.google.com ([209.85.210.59]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1gtj7R-0000St-2Q for gtp-pandoc-discuss@m.gmane.org; Wed, 13 Feb 2019 02:13:45 +0100 Original-Received: by mail-ot1-f59.google.com with SMTP id o13sf638468otl.20 for ; Tue, 12 Feb 2019 17:13:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=vPkbys/n5DWYzBAWcmPQCYAHbpFqwPG2ZUTnfSZOL7E=; b=dhpNR7OUszNyVUhY06tijnpg3KrwGiMGt5Br95LAQGnJdlpwQw0KAURMUDe+PUMv6H yZS6UZzIvo+4edPnF6bxByKcRtK5n3ifrXKgShUa881UMbahB7iTkPtuBY4r10mJn6GP hx4Pn/esuyGILbzeGatzogp3N+krJkILrermL+eORGjdR90bSoUpvT12Y/t+39bWOKy3 em6OmpLGOrZ8/4TaavBBTZjIelnytJTs+jxmciuAjPgKUGUoWDiC2Dy0UASYH0sOXOuQ VgVv/NggWTZOMFU9QfZALjstJ4lSWPPujAva2D0tFKxjW2U9AdR3G6HdteG3tn6FGgbo H/hg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=vPkbys/n5DWYzBAWcmPQCYAHbpFqwPG2ZUTnfSZOL7E=; b=bUlqAn+W83omPdr73vTX8XRR8e0y1bS+MQY9wPeFqNqELPBgJq/musKWJvRP3FDEGW LdmASNwdT1aktQJj35jqBNPb7wAbwnW5aOrSu113mMi2DGQYoHxfpwLyrMr9iBcKF7Ob fWOmzsBqKox+YPVtpbzcyc+F6HhX0QolP+vU3P8Vjp265dYWkO4+EIs2C/sODoGfExAd 9M1yUPDbKCmnmfTL0LRUYzZAfgyE7xgB7iUvCRxtRvLUjtEVq17d72yIOVZkStFoc7x2 +g9X1YQPx1u91okg+e0iSkjqOHo7LeIUSAQu9scurujeFNT8SxxUPpwuCLDsedeXV/mV KXPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=vPkbys/n5DWYzBAWcmPQCYAHbpFqwPG2ZUTnfSZOL7E=; b=E6KYnVrUg4WPgw5R6R8/KXuW8EaDXRIS1gU5gt8RmdRgQM2Z+XcZo9A8Ga674SNEqj QzzDvgfG3nLnbbOxSVZXnrp7n3kb5RDYXuKeh86djjvmBsMzkcGrYY95qztE6lkfzd1B XJAC9tO6O6UPsre0MJwItCjTPGVobTjR0eeL22z8xydPbYJtiyq2UGwag8ocgqZx//J4 gU0SMGYs46IAJ7kM5aUbSUvmlNIWnzUDih/ULl78C3JA2YDI6ERehY1bsTUq6xapFscf or8pAMS7sqO+PhHI5fxyJ07xAaiJo9R1YDYnyRwJfau5k/r9K8fy8xOlFUFo/KpvIUKX qTgA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHQUAuZp+qtK81hOsZKFYsPuS7jtU2GewEr4RJv0PvCUs+UHecHdX1xC ZvW3qD54rO9+G+EPXpI3+Ao= X-Google-Smtp-Source: AHgI3IaQ5ytNN6B5ZCpRbWsCdH9QJCK13jUuWymqqPcuUc3Soqb/Q3svgT8DJCqsyBeGTCsUSEq4Kw== X-Received: by 2002:a9d:19a4:: with SMTP id k33mr152937otk.5.1550020423755; Tue, 12 Feb 2019 17:13:43 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:305:: with SMTP id 5ls597907oid.6.gmail; Tue, 12 Feb 2019 17:13:43 -0800 (PST) X-Received: by 2002:aca:df55:: with SMTP id w82mr3467oig.6.1550020422876; Tue, 12 Feb 2019 17:13:42 -0800 (PST) In-Reply-To: <50ee8006-c909-4b7f-a81b-98d83c2a4aa9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: ebkysko-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.org gmane.text.pandoc:22092 Archived-At: ------=_Part_1233_2107241201.1550020422284 Content-Type: multipart/alternative; boundary="----=_Part_1234_868898571.1550020422284" ------=_Part_1234_868898571.1550020422284 Content-Type: text/plain; charset="UTF-8" *Sigh* I don't know why formatting error appear (blank lines, new lines at wrong places) when I use google groups "code syntax" from the UI... and of course can't edit my dang post... So here's in raw form : ``` local looking_at_section = false local lvl = 0 local remove = {} -- delete line if 'remove' array not needed function Block (elem) if elem.t == "Header" then -- if elem.classes:includes('remove',1) then if elem.identifier == 'remove' then looking_at_section = true lvl = elem.level else looking_at_section = looking_at_section and elem.level > lvl end end if looking_at_section then remove[#remove + 1] = elem -- delete line if 'remove' array not needed return {} end end ``` -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e3c5e5cf-8f2b-481f-afcd-de08d1a653b4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_1234_868898571.1550020422284 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
*Sigh* I don't know why formatting error appear (= blank lines, new lines at wrong places) when I use google groups "code= syntax" from the UI... and of course can't edit my dang post... S= o here's in raw form :

```
local= looking_at_section =3D false
local lvl =3D 0
local remove =3D {}=C2= =A0 -- delete line if 'remove' array not needed

function Blo= ck (elem)
=C2=A0 if elem.t =3D=3D "Header" then
=C2=A0=C2= =A0=C2=A0 -- if elem.classes:includes('remove',1) then
=C2=A0=C2= =A0=C2=A0 if elem.identifier =3D=3D 'remove' then
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 looking_at_section =3D true
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 lvl =3D elem.level
=C2=A0=C2=A0=C2=A0 else
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 looking_at_section =3D looking_at_section and elem.level > = lvl
=C2=A0=C2=A0=C2=A0 end
=C2=A0 end
=C2=A0 if looking_at_section= then
=C2=A0=C2=A0=C2=A0 remove[#remove + 1] =3D elem=C2=A0 -- delete li= ne if 'remove' array not needed
=C2=A0=C2=A0=C2=A0 return {}
= =C2=A0 end
end
```

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/e3c5e5cf-8f2b-481f-afcd-de08d1a653b4%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_1234_868898571.1550020422284-- ------=_Part_1233_2107241201.1550020422284--