quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.96k stars 326 forks source link

nicer `quarto preview` warnings from Lua #4782

Open cscheid opened 1 year ago

cscheid commented 1 year ago

TIL via @tarleb that PANDOC_STATE.log has a list of warning strings emitted by Pandoc. We could forward those to the front-end in quarto preview so they'd be more visible.

tarleb commented 1 year ago

I've implemented @cscheid's suggestion to provide access to the JSON representation of those messages

pandoc.read('\\foo{bar}', 'latex')
print(pandoc.json.encode(PANDOC_STATE.log[#PANDOC_STATE.log]))
{"column":10,"contents":"\\foo{bar}","line":1,"source":"","type":"SkippedContent","verbosity":"INFO"}