mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Small changes to region rendering
This commit is contained in:
parent
349857a468
commit
009e1fa176
2 changed files with 6 additions and 6 deletions
|
@ -116,12 +116,12 @@ impl ReportText {
|
||||||
Region(region) => {
|
Region(region) => {
|
||||||
for i in region.start_line..=region.end_line {
|
for i in region.start_line..=region.end_line {
|
||||||
buf.push_str(i.to_string().as_str());
|
buf.push_str(i.to_string().as_str());
|
||||||
buf.push_str(" |");
|
buf.push_str(" ┆");
|
||||||
|
|
||||||
let line = src_lines[i as usize];
|
let line = src_lines[i as usize];
|
||||||
|
|
||||||
if !line.is_empty() {
|
if !line.is_empty() {
|
||||||
buf.push(' ');
|
buf.push_str(" ");
|
||||||
buf.push_str(src_lines[i as usize]);
|
buf.push_str(src_lines[i as usize]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ mod test_report {
|
||||||
r#"
|
r#"
|
||||||
x = 1
|
x = 1
|
||||||
y = 2
|
y = 2
|
||||||
f = \a -> a + 4
|
f = \a -> a + 4
|
||||||
|
|
||||||
f x
|
f x
|
||||||
"#
|
"#
|
||||||
|
@ -231,9 +231,9 @@ mod test_report {
|
||||||
})),
|
})),
|
||||||
indoc!(
|
indoc!(
|
||||||
r#"
|
r#"
|
||||||
1 | y = 2
|
1 ┆ y = 2
|
||||||
2 | f = \a -> a + 4
|
2 ┆ f = \a -> a + 4
|
||||||
3 |"#
|
3 ┆"#
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue