Skip to content

Instantly share code, notes, and snippets.

@balaji-dutt
Created May 9, 2020 09:05
Show Gist options
  • Save balaji-dutt/9d50f9dbf30e359630dd70a92b7eb232 to your computer and use it in GitHub Desktop.
Save balaji-dutt/9d50f9dbf30e359630dd70a92b7eb232 to your computer and use it in GitHub Desktop.
Quick and dirty Pandoc LUA filter to remove Markdown headers
-- Runs after initial Markdown file parsing and strips Level 2 headers with identifier {remove}
function Block (elem)
if elem.level == 2 and elem.identifier == 'remove' then
return {} -- "empty list" == remove
else
return head
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment