aboutsummaryrefslogtreecommitdiff
path: root/src/machine.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-31 05:18:49 +0200
committerMartin Fischer <martin@push-f.com>2023-09-03 23:00:05 +0200
commitd45e09a3157c71e3c95bf618a2b181f322c87a5d (patch)
tree0093a5b86f9234e7a92ba64e2112823159dc1f29 /src/machine.rs
parent42a18751eeaaa1637a5446bc5e4965815aa959c0 (diff)
fix!: wrong attribute value spans for char refs
Diffstat (limited to 'src/machine.rs')
-rw-r--r--src/machine.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/machine.rs b/src/machine.rs
index 509dae5..159a8a0 100644
--- a/src/machine.rs
+++ b/src/machine.rs
@@ -790,6 +790,8 @@ where
},
State::AttributeValueDoubleQuoted => match slf.read_char()? {
Some('"') => {
+ slf.emitter
+ .terminate_attribute_value(slf.reader.position() - 1);
slf.state = State::AfterAttributeValueQuoted;
Ok(ControlToken::Continue)
}
@@ -814,6 +816,8 @@ where
},
State::AttributeValueSingleQuoted => match slf.read_char()? {
Some('\'') => {
+ slf.emitter
+ .terminate_attribute_value(slf.reader.position() - 1);
slf.state = State::AfterAttributeValueQuoted;
Ok(ControlToken::Continue)
}
@@ -838,6 +842,8 @@ where
},
State::AttributeValueUnquoted => match slf.read_char()? {
Some(whitespace_pat!()) => {
+ slf.emitter
+ .terminate_attribute_value(slf.reader.position() - 1);
slf.state = State::BeforeAttributeName;
Ok(ControlToken::Continue)
}