Pandoc even poses codeblock execution as an exercise in their custom-filter documentation: https://pandoc.org/filters.html
The python package panflute is also really nice if you don't want to play around with haskell or the AST JSON directly.
No comments yet.