aboutsummaryrefslogtreecommitdiff
path: root/src/machine.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-09-01 12:07:51 +0200
committerMartin Fischer <martin@push-f.com>2023-09-03 23:00:05 +0200
commit0581e619867bde2374376265b24169b404187529 (patch)
tree04b369238b4e13af15fed2324423d1e86d22aaf6 /src/machine.rs
parentf239037c1b960ba16c6c8b2184ac017c53c631bf (diff)
fix!: make attribute spans encoding-independent
Diffstat (limited to 'src/machine.rs')
-rw-r--r--src/machine.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/machine.rs b/src/machine.rs
index c27708d..4f2d129 100644
--- a/src/machine.rs
+++ b/src/machine.rs
@@ -715,11 +715,15 @@ where
},
State::AttributeName => match slf.read_char()? {
c @ Some(whitespace_pat!() | '/' | '>') | c @ None => {
+ slf.emitter
+ .terminate_attribute_name(slf.position_before_match);
slf.state = State::AfterAttributeName;
slf.unread_char(c);
Ok(ControlToken::Continue)
}
Some('=') => {
+ slf.emitter
+ .terminate_attribute_name(slf.position_before_match);
slf.state = State::BeforeAttributeValue;
Ok(ControlToken::Continue)
}