diff options
author | Martin Fischer <martin@push-f.com> | 2023-09-03 11:06:25 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-09-03 23:00:05 +0200 |
commit | 6e6bbcd053c6114a9fa75052b09e701eaa2f3465 (patch) | |
tree | 609a4823541e28a40244ad018ad1bb3a9aeb0124 /src/machine.rs | |
parent | d56686deab81c8b50207b75a485cf26ec8502383 (diff) |
feat: add Doctype::name_span
Diffstat (limited to 'src/machine.rs')
-rw-r--r-- | src/machine.rs | 6 |
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) |