mirror of
https://github.com/Mesabloo/diagnose.git
synced 2024-09-11 11:26:56 +03:00
Report: improve custom pretty printer to handle new lines
This commit is contained in:
parent
e977c7ba6a
commit
3937b074c9
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user