aboutsummaryrefslogtreecommitdiff
path: root/src/machine.rs
diff options
context:
space:
mode:
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 6c4558c..d175b8b 100644
--- a/src/machine.rs
+++ b/src/machine.rs
@@ -1239,10 +1239,14 @@ where
},
State::DoctypeName => match slf.read_char()? {
Some(whitespace_pat!()) => {
+ slf.emitter
+ .terminate_doctype_name(slf.position_before_match);
slf.state = State::AfterDoctypeName;
Ok(ControlToken::Continue)
}
Some('>') => {
+ slf.emitter
+ .terminate_doctype_name(slf.position_before_match);
slf.state = State::Data;
slf.emitter.emit_current_doctype(slf.reader.position());
Ok(ControlToken::Continue)
@@ -1254,6 +1258,8 @@ where
}
None => {
slf.emit_error(Error::EofInDoctype);
+ slf.emitter
+ .terminate_doctype_name(slf.position_before_match);
slf.emitter.set_force_quirks();
slf.emitter.emit_current_doctype(slf.reader.position());
Ok(ControlToken::Eof)