Created
October 7, 2023 08:51
-
-
Save the-solipsist/3a01a3712108b07099b2506b086dd780 to your computer and use it in GitHub Desktop.
Convert Pandoc reference footnotes to inline footnotes
This file contains 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
-- copied from https://groups.google.com/g/pandoc-discuss/c/_5-8TRJhhqo/m/xkbSBz2wAgAJ | |
-- pandoc --lua notes_inline.lua temp.md | sed -e 's/%%opening%%/ /g' | sed -e 's/%%closing%%//g' | |
function Note(note) | |
if #note.content == 1 then | |
table.insert(note.content[1].content, 1, pandoc.Str "%%opening%%") | |
table.insert(note.content[1].content, pandoc.Str "%%closing%%") | |
return note.content[1].content | |
end | |
return note | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment