aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-12 06:31:48 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 13:41:55 +0200
commit9323efc3f862c5b071e808194982cbb6672f9919 (patch)
tree867194b0532c65ca800bdaf69b9b5c6802b22d9c
parent4682f104ea24fc257c22dc12db1a3dad1323662a (diff)
docs: correct `a HTML` to `an HTML` and fix 2 typos
-rw-r--r--src/emitter.rs16
-rw-r--r--src/tokenizer.rs2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/emitter.rs b/src/emitter.rs
index d1180a5..ed8d9e9 100644
--- a/src/emitter.rs
+++ b/src/emitter.rs
@@ -36,7 +36,7 @@ pub trait Emitter<O> {
/// last time.
fn emit_eof(&mut self);
- /// A (probably recoverable) parsing error has occured.
+ /// A (probably recoverable) parsing error has occurred.
fn emit_error(&mut self, error: Error, offset: O);
/// After every state change, the tokenizer calls this method to retrieve a new token that can
@@ -477,7 +477,7 @@ impl<O: Offset> StartTag<O> {
}
}
-/// A HTML end/close tag, such as `</p>` or `</a>`.
+/// An HTML end/close tag, such as `</p>` or `</a>`.
#[derive(Debug, Eq, PartialEq)]
pub struct EndTag<O> {
/// The ending tag's name, such as `"p"` or `"a"`.
@@ -561,22 +561,22 @@ impl<O: Offset> Doctype<O> {
/// [`Emitter`] trait.
#[derive(Debug, Eq, PartialEq)]
pub enum Token<O> {
- /// A HTML start tag.
+ /// An HTML start tag.
StartTag(StartTag<O>),
- /// A HTML end tag.
+ /// An HTML end tag.
EndTag(EndTag<O>),
/// A literal string.
String(String),
- /// A HTML comment.
+ /// An HTML comment.
Comment(Comment<O>),
- /// A HTML doctype declaration.
+ /// An HTML doctype declaration.
Doctype(Doctype<O>),
- /// A HTML parsing error.
+ /// An HTML parsing error.
///
/// Can be skipped over, the tokenizer is supposed to recover from the error and continues with
/// more tokens afterward.
Error {
- /// What kind of error occured.
+ /// What kind of error occurred.
error: Error,
/// The source code span of the error.
span: Range<O>,
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index 469cbd1..d8f1b95 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -32,7 +32,7 @@ impl<T: Copy> Stack2<T> {
}
}
-/// A HTML tokenizer. See crate-level docs for basic usage.
+/// An HTML tokenizer. See crate-level docs for basic usage.
pub struct Tokenizer<R: Reader, O = NoopOffset, E: Emitter<O> = DefaultEmitter<O>> {
eof: bool,
pub(crate) state: InternalState,