diff options
author | Martin Fischer <martin@push-f.com> | 2023-09-01 15:29:58 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-09-03 23:00:05 +0200 |
commit | eea8c60fba5962d5575c8515b837fb6304f73c9d (patch) | |
tree | 09722aca9a6e494c1f63dc7cc0266886a185ebdf /src/machine.rs | |
parent | 03ca8c1f599828eb12e60e6012684bb4c09dbf89 (diff) |
refactor: also use some_offset for start/end tags
Diffstat (limited to 'src/machine.rs')
-rw-r--r-- | src/machine.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/machine.rs b/src/machine.rs index 84fb525..b23e5f2 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -46,6 +46,7 @@ where Ok(ControlToken::Continue) } Some('<') => { + slf.some_offset = slf.reader.position() - 1; slf.state = State::TagOpen; Ok(ControlToken::Continue) } @@ -947,7 +948,6 @@ where } Some('d' | 'D') if slf.try_read_string("octype", false)? => { slf.state = State::Doctype; - slf.some_offset = slf.reader.position() - b"<!doctype".len(); Ok(ControlToken::Continue) } Some('[') if slf.try_read_string("CDATA[", true)? => Ok(ControlToken::CdataOpen), |