diff options
author | Martin Fischer <martin@push-f.com> | 2023-09-12 09:03:56 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-09-28 10:36:08 +0200 |
commit | 14bc6f2cceed0fa578d6a1195266885bf57a5d4c (patch) | |
tree | 50988abce274aa5e4aa5905fb4bcc5c8cc4de652 /examples/spans.rs | |
parent | ad6ac5f0a825775c231e76cdc9016e61e54f4141 (diff) |
chore: add BasicEmitter stub
Diffstat (limited to 'examples/spans.rs')
-rw-r--r-- | examples/spans.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/spans.rs b/examples/spans.rs index fc3c6a1..c1fe23b 100644 --- a/examples/spans.rs +++ b/examples/spans.rs @@ -4,11 +4,12 @@ use codespan_reporting::{ term, term::termcolor::{ColorChoice, StandardStream}, }; -use html5tokenizer::{offset::PosTrackingReader, NaiveParser, Token}; +use html5tokenizer::{offset::PosTrackingReader, NaiveParser, Token, TracingEmitter}; fn main() { let html = r#"<img src=example.jpg alt="some description">"#; - let parser = NaiveParser::new(PosTrackingReader::new(html)); + let parser = + NaiveParser::new_with_emitter(PosTrackingReader::new(html), TracingEmitter::default()); let Token::StartTag(tag) = parser.flatten().next().unwrap() else { panic!() |