blob: 5776362d3512bf16659b1f5488c6d12c766f4978 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//! Let's you easily try out the tokenizer with e.g.
//! printf '<h1>Hello world!</h1>' | cargo run --example=tokenize
use html5tokenizer::{DefaultEmitter, Tokenizer};
use std::io::BufReader;
fn main() {
for token in Tokenizer::new(
BufReader::new(std::io::stdin().lock()),
DefaultEmitter::<_, ()>::default(),
)
.flatten()
{
println!("{:?}", token);
}
}
|