summaryrefslogtreecommitdiff
path: root/src/tokenizer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tokenizer.rs')
-rw-r--r--src/tokenizer.rs33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index d272b14..3a6fb32 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -74,19 +74,33 @@ impl<R: Reader, O: Offset, E: Emitter<O>> Tokenizer<R, O, E> {
#[derive(Debug)]
#[non_exhaustive]
pub enum State {
- /// The [Data state](https://html.spec.whatwg.org/#data-state).
+ /// The [data state].
+ ///
+ /// [data state]: https://html.spec.whatwg.org/#data-state
Data,
- /// The [PLAINTEXT state](https://html.spec.whatwg.org/#plaintext-state).
+ /// The [PLAINTEXT state].
+ ///
+ /// [PLAINTEXT state]: https://html.spec.whatwg.org/#plaintext-state
PlainText,
- /// The [RCDATA state](https://html.spec.whatwg.org/#rcdata-state).
+ /// The [RCDATA state].
+ ///
+ /// [RCDATA state]: https://html.spec.whatwg.org/#rcdata-state
RcData,
- /// The [RAWTEXT state](https://html.spec.whatwg.org/#rawtext-state).
+ /// The [RAWTEXT state].
+ ///
+ /// [RAWTEXT state]: https://html.spec.whatwg.org/#rawtext-state
RawText,
- /// The [Script data state](https://html.spec.whatwg.org/#script-data-state).
+ /// The [script data state].
+ ///
+ /// [script data state]: https://html.spec.whatwg.org/#script-data-state
ScriptData,
- /// The [Script data escaped state](https://html.spec.whatwg.org/#script-data-escaped-state).
+ /// The [script data escaped state].
+ ///
+ /// [script data escaped state]: https://html.spec.whatwg.org/#script-data-escaped-state
ScriptDataEscaped,
- /// The [Script data double escaped state](https://html.spec.whatwg.org/#script-data-double-escaped-state).
+ /// The [script data double escaped state].
+ ///
+ /// [script data double escaped state]: https://html.spec.whatwg.org/#script-data-double-escaped-state
ScriptDataDoubleEscaped,
}
@@ -129,8 +143,9 @@ impl<R: Reader + Position<O>, O: Offset, E: Emitter<O>> Tokenizer<R, O, E> {
/// * the _last start tag_ exists
/// * the current end tag token's name equals to the last start tag's name.
///
- /// See also [WHATWG's definition of "appropriate end tag
- /// token"](https://html.spec.whatwg.org/#appropriate-end-tag-token).
+ /// See also WHATWG's definition of [appropriate end tag token].
+ ///
+ /// [appropriate end tag token]: https://html.spec.whatwg.org/#appropriate-end-tag-token
#[inline]
pub(crate) fn current_end_tag_is_appropriate(&mut self) -> bool {
self.current_tag_name == self.last_start_tag_name