mirror of
https://github.com/typst/typst
synced 2025-08-24 03:34:14 +08:00
refactor: change error message formatting
This commit is contained in:
parent
0ed6b31b70
commit
788106005f
@ -418,7 +418,10 @@ impl<'a> Parser<'a> {
|
||||
};
|
||||
|
||||
let start = self.parse_line_col()?;
|
||||
let lines = Lines::try_from(&bytes).expect("Errors shouldn't be annotated for files that aren't human readable (not valid utf-8)");
|
||||
let lines = Lines::try_from(&bytes).expect(
|
||||
"errors shouldn't be annotated for files \
|
||||
that aren't human readable (not valid utf-8)",
|
||||
);
|
||||
let range = if self.s.eat_if('-') {
|
||||
let (line, col) = start;
|
||||
let start = lines.line_column_to_byte(line, col);
|
||||
|
Loading…
x
Reference in New Issue
Block a user