diff options
author | Martin Fischer <martin@push-f.com> | 2023-08-30 09:42:36 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-09-03 23:00:05 +0200 |
commit | 854e55cd8577baa24a2f3bd00e4ed8687e150f36 (patch) | |
tree | 4a2cf04e71928b7cde58c0a837fdac8ee8caef9a /src/tokenizer.rs | |
parent | bbb00e4a029187ec9e0998639d3470f463c4a798 (diff) |
fix: most error spans mistakenly being empty
With codespan_reporting an empty span shows up exactly like a
one-byte span, which is why I didn't notice this mistake earlier.
Diffstat (limited to 'src/tokenizer.rs')
-rw-r--r-- | src/tokenizer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 6cf930f..871074e 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -185,7 +185,7 @@ impl<R: Reader + Position<O>, O: Offset, E: Emitter<O>> Tokenizer<R, O, E> { | Error::EofInDoctype | Error::EofInScriptHtmlCommentLikeText | Error::EofInTag => self.reader.position()..self.reader.position(), - _ => self.reader.position() - 1..self.reader.position() - 1, + _ => self.reader.position() - 1..self.reader.position(), }; self.emitter.emit_error(error, span); } |