In case anyone is interested in such a filter: -- cutsection.lua - remove tagged sections in Pandoc output -- heavily adapted from https://github.com/pandoc/lua-filters/tree/master/abstract-to-meta local looking_at_section = false local remove = {} function Block (elem) if looking_at_section then remove[#remove + 1] = elem return {} end end function Header (elem) if elem.identifier == 'remove' then looking_at_section = true return {} else looking_at_section = false end end On Saturday, February 9, 2019 at 1:55:15 PM UTC-5, Colin McLear wrote: > > I would like to be able to put an id like {#ignore} next to any section > title of arbitrary depth (i.e. h1, h2, etc) and have a lua filter that just > removes that section for any output. I have a filter that accomplishes this > for particular headings but for some reason (well, probably because I know > very little lua) I can't make this work for heading and content. Any ideas > are appreciated! > > > -- 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/717bc9dc-b99a-4472-9965-1c84a737fc01%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.