Report: improve custom pretty printer to handle new lines

This commit is contained in:
Mesabloo 2020-09-14 18:18:51 +02:00 committed by GitHub
parent e977c7ba6a
commit 3937b074c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,7 +161,7 @@ prettyMarker underlineLen marker colorThis colorWhere colorMaybe = case marker o
-- | A smarter pretty to keep long texts in between the bounds and correctly align them.
smartPretty :: (PrettyText d) => d -> Doc
smartPretty = fillSep . fmap text . words . show . prettyText
smartPretty = vsep . fmap (fillSep . fmap text . words) . lines . show . prettyText
-- | Applies a function to the list if it isn't '[]', else returns it.