Created
May 1, 2023 20:18
-
-
Save dmgottlieb/b498094a7acc09d9e51295b3c6572401 to your computer and use it in GitHub Desktop.
pandoc lua filter to convert inline wikilinks to html links. Allows me to build the static site for my notes using a fast pandoc pipeline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Str(el) | |
| -- convert inline wikilinks to html links | |
| if el.text:match("%[%[.-%]%]") then | |
| local dest_file = el.text:match("%[%[(.-)%]%]") | |
| return pandoc.Link(el.text, dest_file .. ".html") | |
| end | |
| return el | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment