aboutsummaryrefslogtreecommitdiff
path: root/src/naive_parser.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-09-04 20:32:23 +0200
committerMartin Fischer <martin@push-f.com>2023-09-28 10:36:08 +0200
commit4e0057344381a50cd76419be170eab3d9389f034 (patch)
tree7bdaab30adfb85766118a7bd779a88eb10bc16d7 /src/naive_parser.rs
parent30b4adf60b9423968b0c9c6d23363f6d8cd99384 (diff)
break!: rename State variants
The spec refers to them only as RCDATA, RAWTEXT and PLAINTEXT. See https://rust-lang.github.io/api-guidelines/naming.html.
Diffstat (limited to 'src/naive_parser.rs')
-rw-r--r--src/naive_parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/naive_parser.rs b/src/naive_parser.rs
index b26e25e..ec07b07 100644
--- a/src/naive_parser.rs
+++ b/src/naive_parser.rs
@@ -97,10 +97,10 @@ pub(crate) fn naive_next_state(tag_name: &str) -> State {
// These transitions are defined in https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments.
// TODO: investigate what state logic Python's HTMLParser is using
match tag_name {
- "title" | "textarea" => State::RcData,
- "style" | "xmp" | "iframe" | "noembed" | "noframes" => State::RawText,
+ "title" | "textarea" => State::Rcdata,
+ "style" | "xmp" | "iframe" | "noembed" | "noframes" => State::Rawtext,
"script" => State::ScriptData,
- "plaintext" => State::PlainText,
+ "plaintext" => State::Plaintext,
_other => State::Data,
}
}