diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-02-17 21:30:20 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-02-17 21:30:20 +0100 |
| commit | 2f4dc99cec1c6fa33257dea91ab3bcd99b1cbdf5 (patch) | |
| tree | eb983e54bac5ae226474bd8c5d6a29006b00ff12 /tests/typeset.rs | |
| parent | db1659a987cd240b78e45666617248d3d0cc7d64 (diff) | |
Refresh tests 🌊
Diffstat (limited to 'tests/typeset.rs')
| -rw-r--r-- | tests/typeset.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index 7f8646be..ac4fe9b0 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -296,7 +296,9 @@ fn parse_metadata(src: &str, map: &LineMap) -> (Option<bool>, DiagSet) { }; let mut s = Scanner::new(rest); - let (start, _, end) = (pos(&mut s), s.eat_assert('-'), pos(&mut s)); + let start = pos(&mut s); + let end = if s.eat_if('-') { pos(&mut s) } else { start }; + diags.insert(Diag::new(start .. end, level, s.rest().trim())); } |
