You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use ariadne::*;constTEXT:&str = "a b c d";fnreport_n_labels(n:usize){letmut report = Report::build(ReportKind::Error,(),0);for i in0..n {
report = report.with_label(Label::new(i *2..i *2 + 1));}
report.finish().print(Source::from(TEXT)).unwrap();}fnmain(){for n in1..=4{report_n_labels(n);}}
This gives output:
Error:
╭─[<unknown>:1:1]
│
1 │ a b c d
· ─
·
───╯
Error:
╭─[<unknown>:1:1]
│
1 │ a b c d
· ─ ─
·
·
·
───╯
Error:
╭─[<unknown>:1:1]
│
1 │ a b c d
· ─ ─ ─
·
·
·
·
·
───╯
Error:
╭─[<unknown>:1:1]
│
1 │ a b c d
· ─ ─ ─ ─
·
·
·
·
·
·
·
───╯
It looks like labels add extra vertical space for their messages even if they don't have messages.
This occurs with compact mode too.
I think this is undesirable.
The text was updated successfully, but these errors were encountered:
Consider this example:
This gives output:
It looks like labels add extra vertical space for their messages even if they don't have messages.
This occurs with compact mode too.
I think this is undesirable.
The text was updated successfully, but these errors were encountered: