From 183e9a77546f8218cc6536c75c3443167ce2e121 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Sat, 29 Jun 2019 22:38:42 +0000 Subject: [PATCH] Encode pretty JSON using encodePretty, highlighting doesn't do formatting! --- src/Yesod/RenderSource.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yesod/RenderSource.hs b/src/Yesod/RenderSource.hs index 506188f..29c14f2 100644 --- a/src/Yesod/RenderSource.hs +++ b/src/Yesod/RenderSource.hs @@ -262,7 +262,7 @@ renderPandocMarkdown input = . writeHtml5 writerOptions renderPrettyJSON :: ToJSON a => a -> WidgetFor site () -renderPrettyJSON = renderPrettyJSON' . encode +renderPrettyJSON = renderPrettyJSON' . encodePretty renderPrettyJSON' :: BL.ByteString -> WidgetFor site () renderPrettyJSON' prettyBL = @@ -289,4 +289,4 @@ renderPrettyJSONSkylighting' prettyBL = options = defaultFormatOpts { numberLines = True } renderPrettyJSONSkylighting :: ToJSON a => a -> WidgetFor site () -renderPrettyJSONSkylighting = renderPrettyJSONSkylighting' . encode +renderPrettyJSONSkylighting = renderPrettyJSONSkylighting' . encodePretty