1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-29 02:34:51 +09:00

Encode pretty JSON using encodePretty, highlighting doesn't do formatting!

This commit is contained in:
fr33domlover 2019-06-29 22:38:42 +00:00
parent 685b7ec2bc
commit 183e9a7754

View file

@ -262,7 +262,7 @@ renderPandocMarkdown input =
. writeHtml5 writerOptions . writeHtml5 writerOptions
renderPrettyJSON :: ToJSON a => a -> WidgetFor site () renderPrettyJSON :: ToJSON a => a -> WidgetFor site ()
renderPrettyJSON = renderPrettyJSON' . encode renderPrettyJSON = renderPrettyJSON' . encodePretty
renderPrettyJSON' :: BL.ByteString -> WidgetFor site () renderPrettyJSON' :: BL.ByteString -> WidgetFor site ()
renderPrettyJSON' prettyBL = renderPrettyJSON' prettyBL =
@ -289,4 +289,4 @@ renderPrettyJSONSkylighting' prettyBL =
options = defaultFormatOpts { numberLines = True } options = defaultFormatOpts { numberLines = True }
renderPrettyJSONSkylighting :: ToJSON a => a -> WidgetFor site () renderPrettyJSONSkylighting :: ToJSON a => a -> WidgetFor site ()
renderPrettyJSONSkylighting = renderPrettyJSONSkylighting' . encode renderPrettyJSONSkylighting = renderPrettyJSONSkylighting' . encodePretty