mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Let test error hide line number if it's zero (#4535)
This commit is contained in:
parent
be516867c8
commit
ab5cebc57c
@ -48,7 +48,11 @@ impl FilePos {
|
||||
|
||||
impl Display for FilePos {
|
||||
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
||||
if self.line > 0 {
|
||||
write!(f, "{}:{}", self.path.display(), self.line)
|
||||
} else {
|
||||
write!(f, "{}", self.path.display())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user