aboutsummaryrefslogtreecommitdiff
path: root/src/machine.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/machine.rs
parentf588704c90f33fe27945d742762d016dea3e113c (diff)
fix!: make start/end tag name spans encoding-independent
Diffstat (limited to 'src/machine.rs')
-rw-r--r--src/machine.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/machine.rs b/src/machine.rs
index 5b36eee..c27708d 100644
--- a/src/machine.rs
+++ b/src/machine.rs
@@ -190,14 +190,17 @@ where
},
State::TagName => match slf.read_char()? {
Some(whitespace_pat!()) => {
+ slf.emitter.terminate_tag_name(slf.position_before_match);
slf.state = State::BeforeAttributeName;
Ok(ControlToken::Continue)
}
Some('/') => {
+ slf.emitter.terminate_tag_name(slf.position_before_match);
slf.state = State::SelfClosingStartTag;
Ok(ControlToken::Continue)
}
Some('>') => {
+ slf.emitter.terminate_tag_name(slf.position_before_match);
slf.state = State::Data;
slf.emit_current_tag();
Ok(ControlToken::Continue)