Skip to content

Instantly share code, notes, and snippets.

@danieltomasz
Last active September 14, 2022 22:26
Show Gist options
  • Save danieltomasz/e0890b15a806ebf915385ac40a399e11 to your computer and use it in GitHub Desktop.
Save danieltomasz/e0890b15a806ebf915385ac40a399e11 to your computer and use it in GitHub Desktop.
A naive proof of the concept Lua filter removing wikilinks

A naive proof of the concept Lua filter for removing [[ wikilinks from markdown file.

function Str (str)
    return (str.text:gsub('%[%[', '')
                    :gsub('%]%]', ''))
end

When the filter is saved under name cleanwiki.lua it might be used with the flag --lua-filter=cleanwiki.lua or added to yaml as

pandoc_args:
  - --lua-filter=raise-header.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment