From 8a75c077b033853fe65332870c98d1ff8df0aa19 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 7 Jan 2026 11:33:37 +0100 Subject: Logging: add `pretty` field to ToJSON instance for LogMessage. This just reproduces the output of `logMessage`, for convenience for those who are using the JSON output outside of Haskell. --- src/Text/Pandoc/Logging.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs index 880bfb068..e28a40bba 100644 --- a/src/Text/Pandoc/Logging.hs +++ b/src/Text/Pandoc/Logging.hs @@ -111,6 +111,7 @@ instance ToJSON LogMessage where toJSON x = object $ "verbosity" .= toJSON (messageVerbosity x) : "type" .= toJSON (show $ toConstr x) : + "pretty" .= toJSON (showLogMessage x) : case x of SkippedContent s pos -> ["contents" .= s, -- cgit v1.2.3