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.