mirror of
https://github.com/Mesabloo/diagnose.git
synced 2024-09-11 11:26:56 +03:00
Report: better render multiline error messages
This commit is contained in:
parent
fe1f0ee0cc
commit
e977c7ba6a
@ -88,7 +88,7 @@ hint = Hint
|
||||
prettyReport :: (Foldable s, PrettyText (s a), PrettyText m) => Files s a -> Report m -> Doc
|
||||
prettyReport files (Report kind msg markers hints) =
|
||||
let (color, margin, sev) = prettyKind kind
|
||||
in color (bold sev) <> colon <+> prettyText msg <$>
|
||||
in color (bold sev) <> colon <+> align (smartPretty msg) <$>
|
||||
mconcat (replicate (margin - 2) space) <> text "In" <> colon <+>
|
||||
prettyCodeWithMarkers files markers color <$> line <>
|
||||
prettyHints hints
|
||||
|
Loading…
Reference in New Issue
Block a user