aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-09-01 12:53:29 +0200
committerMartin Fischer <martin@push-f.com>2023-09-03 23:00:05 +0200
commitf239037c1b960ba16c6c8b2184ac017c53c631bf (patch)
tree1b40c7151f5f9270b26ba2a15088f90dca175a43 /src/tokenizer.rs
parentf588704c90f33fe27945d742762d016dea3e113c (diff)
fix!: make start/end tag name spans encoding-independent
Diffstat (limited to 'src/tokenizer.rs')
-rw-r--r--src/tokenizer.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index 58f7b80..e0402b9 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -221,14 +221,16 @@ impl<R: Reader + Position<O>, O: Offset, E: Emitter<O>> Tokenizer<R, O, E> {
#[inline]
pub(crate) fn init_start_tag(&mut self) {
- self.emitter.init_start_tag(self.some_offset);
+ self.emitter
+ .init_start_tag(self.some_offset, self.position_before_match);
self.current_tag_name.clear();
self.is_start_tag = true;
}
#[inline]
pub(crate) fn init_end_tag(&mut self) {
- self.emitter.init_end_tag(self.some_offset);
+ self.emitter
+ .init_end_tag(self.some_offset, self.position_before_match);
self.current_tag_name.clear();
self.is_start_tag = false;
}