Currently in native import mode we run pandoc -t json. This is useless if people use filters that need to have the ultimate output format in FORMAT.
Solution: we run pandoc -t FORMAT (adjusting html when building an epub), but we catch the AST object rather than the output. To do this we need a filter that outputs the AST as json in a temp file that we can pick up. The command would look something like this:
pandoc source -t FORMAT -L catch.lua -M catch-filter-output=temporary.json
Currently in native import mode we run pandoc -t json. This is useless if people use filters that need to have the ultimate output format in FORMAT.
Solution: we run pandoc -t FORMAT (adjusting html when building an epub), but we catch the AST object rather than the output. To do this we need a filter that outputs the AST as json in a temp file that we can pick up. The command would look something like this:
pandoc source -t FORMAT -L catch.lua -M catch-filter-output=temporary.json