diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -8,12 +8,13 @@ ```rust use std::fmt::Write; -use html5tokenizer::{Tokenizer, Token}; +use html5tokenizer::{DefaultEmitter, Tokenizer, Token}; let html = "<title >hello world</title>"; +let emitter = DefaultEmitter::<_, ()>::default(); let mut new_html = String::new(); -for token in Tokenizer::new(html).flatten() { +for token in Tokenizer::new(html, emitter).flatten() { match token { Token::StartTag(tag) => { write!(new_html, "<{}>", tag.name).unwrap(); |