pandoc -t json myfile.md | jq .
Hello,I often work on Pandoc filters, and I regularly look at Pandoc's native format.Here is an example of the output in my terminal:
> pandoc -i myfile.md --to native[Para [Image ("fig:myfigure",[],[]) [Str "Figure",Space,Str "1:",Space,Str "This",Space,Str "is",Space,Str "a",Space,Str "caption"] ("generated/other\\8842295943125512100.jpg","fig: ")] ,Para [Str "As",Space,Str "you",Space,Str "can",Space,Str "see",Space,Str "in",Space,Str "fig.\160\&1,",Space,Str "pandoc-crossref",Space,Str "is",Space,Str "compatible",Space,Str "with",Space,Str "the",Space,Str "ouput",Space,Str "of",Space,Str "pandoc-pyplot."]]It would be very useful to get a pretty-printing version of the above, e.g.:[Para [Image("fig:myfigure",[],[])[Str "Figure",Space,Str "1:",Space,Str "This",Space,Str "is",Space,Str "a",Space,Str "caption"]("generated/other\\8842295943125512100.jpg","fig: ") ],Para [Str "As",Space,Str "you",Space,Str "can",Space,Str "see",Space,Str "in",Space,Str "fig.\160\&1,",Space,Str "pandoc-crossref",Space,Str "is",Space,Str "compatible",Space,Str "with",Space,Str "the",Space,Str "ouput",Space,Str "of",Space, Str "pandoc-pyplot."]]After a cursory look at the source in Text.Pandoc.Writers.Native, it would be possible to make a nice, indented, pretty version of native Haskell, given that WriterOptions type has the writerColumns attribute.Is this something that the Pandoc community might be interested in? Should it be a different format than "native", called "pretty-native" or something?I'm happy to put together a pull request.Laurent