better handle multiline errors
this is more of a quick fix for potential panics; it does not properly substitute for real multiline error messages
This commit is contained in:
parent
35087fb266
commit
3c1c55038f
@ -66,7 +66,7 @@ impl Display for SassError {
|
||||
"{}| {}{}",
|
||||
padding,
|
||||
vec![' '; loc.begin.column].iter().collect::<String>(),
|
||||
vec!['^'; loc.end.column - loc.begin.column]
|
||||
vec!['^'; loc.end.column.max(loc.begin.column) - loc.begin.column.min(loc.end.column)]
|
||||
.iter()
|
||||
.collect::<String>()
|
||||
)?;
|
||||
|
@ -130,3 +130,4 @@ error!(unclosed_dbl_quote, "@if true \" {}", "Error: Expected \".");
|
||||
error!(unclosed_sgl_quote, "@if true ' {}", "Error: Expected '.");
|
||||
error!(unclosed_call_args, "@if a({}", "Error: expected \")\".");
|
||||
error!(nothing_after_div, "@if a/", "Error: Expected expression.");
|
||||
error!(multiline_error, "@if \"\n\"{}", "Error: Expected \".");
|
||||
|
Loading…
x
Reference in New Issue
Block a user