Skip to content
Discussion options

You must be logged in to vote

Yes, you can create a custom Lua reader that divides the text into chunks and generates AST nodes directly for some chunks while passing others through pandoc's markdown reader to create AST nodes. The Lua function you'd use is pandoc.read. There are some limitations to this, because each chunk you pass to the markdown reader will be parsed in isolation. Thus, anything that depends on the global context may not come out right -- e.g. if you have reference links or footnotes defined elsewhere in the document, or if you use automatically numbered example lists. But it should largely work.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@dominikue
Comment options

Answer selected by dominikue
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants