From 0b229d5ab69fe09ffc223ba8bfca67d2af10d4b4 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Thu, 24 Aug 2023 14:49:10 +0900 Subject: [PATCH] improve `print_reports(::IO, ::Vector{ToplevelErrorReport})` --- src/ui/print.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui/print.jl b/src/ui/print.jl index e32bc02d9..db547fc82 100644 --- a/src/ui/print.jl +++ b/src/ui/print.jl @@ -117,16 +117,16 @@ function print_reports(io::IO, end for report in reports - s = string("┌ @ ", (config.fullpath ? tofullpath : identity)(string(report.file)), ':', report.line, ' ') - printlnstyled(io, s; color) + filepath = (config.fullpath ? tofullpath : identity)(report.file) + printlnstyled(io, "┌ @ ", filepath, ':', report.line, ' '; color) errlines = with_bufferring(arg) do io print_report(io, report) end |> strip - println(io, join(string.(rail, split(errlines, '\n')), '\n')) + join(io, string.(rail, split(errlines, '\n')), '\n') + println(io) - s = string('└', '─'^(length(s)-1)) - printlnstyled(io, s; color) + printlnstyled(io, '└', '─'^(length(s)-1); color) end end |> postprocess |> (x->print(io::IO,x))