aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-09-01 15:28:30 +0200
committerMartin Fischer <martin@push-f.com>2023-09-03 23:00:05 +0200
commitfd43f18f20afcead7f3976ac893a4b5c4155b41f (patch)
treee9f10f5a2817a52c9414fe219edea1bdcd23f2d8 /src/tokenizer.rs
parent592a3bb1fc8dacb159a6fd5168df6f69015a5184 (diff)
chore: rename doctype_offset field to some_offset
We'll reuse the field for another offset in the next commit.
Diffstat (limited to 'src/tokenizer.rs')
-rw-r--r--src/tokenizer.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index f76cad8..f41f5ae 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -49,7 +49,8 @@ pub struct Tokenizer<R: Reader, O, E: Emitter<O>> {
current_tag_name: String,
last_start_tag_name: String,
is_start_tag: bool,
- pub(crate) doctype_offset: O,
+ /// * Set to the start offset of `<!doctype` in [`InternalState::MarkupDeclarationOpen`].
+ pub(crate) some_offset: O,
/// This boolean flag exists so that the [`NaiveParser`](crate::NaiveParser) can work with any [`Emitter`]
/// (it cannot call [`Tokenizer::set_state`] using the emitted start tags since they can be of an arbitrary type).
pub(crate) naively_switch_state: bool,
@@ -75,7 +76,7 @@ impl<R: Reader + Position<O>, O: Offset, E: Emitter<O>> Tokenizer<R, O, E> {
current_tag_name: String::new(),
last_start_tag_name: String::new(),
is_start_tag: false,
- doctype_offset: O::default(),
+ some_offset: O::default(),
naively_switch_state: false,
}
}