We don't get pretty output by default with pandoc lua
like we do with --to native
pandoc -f markdown -t native

^Z
[ Figure
( "" , [] , [] )
(Caption
Nothing [ Plain [ Str "My" , Space , Str "Image" ] ])
[ Plain
[ Image
( "" , [] , [] )
[ Str "My" , Space , Str "Image" ]
( "local/img/jpg" , "" )
]
]
]
pandoc lua -i
Lua 5.4.4 Copyright (C) 1994-2022 Lua.org, PUC-Rio
Embedded in pandoc 3.1.2
> pandoc.Figure( pandoc.Image( {}, 'local/img.jpg'), { 'My image' })
Figure ("",[],[]) (Caption Nothing [Plain [Str "My",Space,Str "image"]]) [Plain [Image ("",[],[]) [] ("local/img.jpg","")]]
We can use the pretty.lua
filter to get pretty output
pandoc lua -l pretty -i