summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_spans.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_spans.rs b/tests/test_spans.rs
index 718a176..a8bf97c 100644
--- a/tests/test_spans.rs
+++ b/tests/test_spans.rs
@@ -10,7 +10,7 @@ use html5tokenizer::{offset::PosTrackingReader, NaiveParser, Token};
use insta::assert_snapshot;
use similar_asserts::assert_eq;
-fn tokenizer(html: &'static str) -> impl Iterator<Item = Token<usize>> {
+fn parser(html: &'static str) -> impl Iterator<Item = Token<usize>> {
NaiveParser::new(PosTrackingReader::new(html)).flatten()
}
@@ -22,7 +22,7 @@ fn test_and_annotate<S: AsRef<str> + Clone>(
html: &'static str,
labeler: impl Fn(TokenIter) -> Vec<(Range<usize>, S)>,
) -> String {
- let labels = labeler(Box::new(tokenizer(html)));
+ let labels = labeler(Box::new(parser(html)));
assert_char_encoding_independence(html, labeler);
@@ -250,7 +250,7 @@ fn comment_data_span() {
"###);
for (idx, case) in cases.iter().enumerate() {
- let Token::Comment(comment) = tokenizer(case)
+ let Token::Comment(comment) = parser(case)
.filter(|t| !matches!(t, Token::Error { .. }))
.next()
.unwrap()
@@ -333,7 +333,7 @@ fn doctype_id_spans() {
}
fn annotate_errors(html: &'static str) -> String {
- for token in tokenizer(html) {
+ for token in parser(html) {
let Token::Error { span, .. } = token else {
continue;
};