Skip to content

Instantly share code, notes, and snippets.

@tarleb
tarleb / highlight.lua
Created July 15, 2022 12:54
Custom syntax extension
--[[
Add support for a custom inline syntax.
This pandoc Lua filter allows to add a custom markup syntax
extension. It is designed to be adjustable; it should not be
necessary to modify the code below the separator line.
The example here allows to add highlighted text by enclosing the
text with `==` on each side. Pandoc supports this for HTML output
out of the box. Other outputs will need additional filters.
@tarleb
tarleb / noexport-subtrees.lua
Last active January 19, 2024 17:52
Emulating org-mode's :noexport: behavior for Markdown.
--[[
Remove all subtrees whose headlines contain class `noexport`.
License: MIT
Copyright: © Albert Krewinkel
]]
-- pandoc.utils.make_sections exists since pandoc 2.8
PANDOC_VERSION:must_be_at_least {2,8}
@phil-blain
phil-blain / .gitattributes
Last active March 29, 2024 22:38
Git pickaxe : show only relevant hunks (filter displayed hunks using the given search string)
*.md diff=markdown