mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 05:35:33 +00:00
fix misaligned error reporting on tab char (#5032)
This commit is contained in:
parent
fa396c0a22
commit
25b765c123
5 changed files with 31 additions and 2 deletions
|
@ -74,7 +74,11 @@ fn format_maybe_source_line(
|
|||
'~'
|
||||
};
|
||||
for _i in 0..start_column {
|
||||
s.push(' ');
|
||||
if source_line.chars().nth(_i as usize).unwrap() == '\t' {
|
||||
s.push('\t');
|
||||
} else {
|
||||
s.push(' ');
|
||||
}
|
||||
}
|
||||
for _i in 0..(end_column - start_column) {
|
||||
s.push(underline_char);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue