aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-17 09:40:47 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 13:41:55 +0200
commitc15895d44d17984386d3684e2aa85aca386ba3bf (patch)
treea7c92e5eff97bd7645c7d309c8bf94ea891459ad /README.md
parentd5c9a851756b1e84b022c2fbf984137aae68e2c9 (diff)
refactor!: make Emitter generic over offset instead of reader
Emitters should not have access to the reader at all. Also the current position of the reader, at the time an Emitted method is called, very much depends on machine implementation details such as if `Tokenizer::unread_char` is used. Having the Emitter methods take offsets lets the machine take care of providing the right offsets, as evidenced by the next commit.
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 70b5be6..98a09c5 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ use std::fmt::Write;
use html5tokenizer::{DefaultEmitter, Tokenizer, Token};
let html = "<title >hello world</title>";
-let emitter = DefaultEmitter::<_>::default();
+let emitter = DefaultEmitter::default();
let mut new_html = String::new();
for token in Tokenizer::new(html, emitter).flatten() {