diff options
| author | John MacFarlane <[email protected]> | 2026-01-07 11:33:37 +0100 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2026-01-07 11:33:37 +0100 |
| commit | 8a75c077b033853fe65332870c98d1ff8df0aa19 (patch) | |
| tree | af704bbb9b9b76e722cbd76f91ea2d5a1d4ee46f /src | |
| parent | b206e941caeba9f840557694f351b5cafe4af657 (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Logging.hs | 1 |
1 files changed, 1 insertions, 0 deletions
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, |
