Skip to content

Commit

Permalink
Fix typo and add example (untitaker#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
not-my-profile authored Dec 3, 2021
1 parent 5e69d33 commit c9c8fcf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions examples/tokenize.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//! Let's you easily try out the tokenizer with e.g.
//! printf '<h1>Hello world!</h1>' | cargo run --example=tokenize
use html5gum::{BufReadReader, Tokenizer};

fn main() {
for token in Tokenizer::new(BufReadReader::new(std::io::stdin().lock())).flatten() {
println!("{:?}", token);
}
}
2 changes: 1 addition & 1 deletion tests/test_html5lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{collections::BTreeMap, fs::File, io::BufReader, path::Path};

#[cfg(not(feature = "integration-tests"))]
compile_error!(
"integration tests need the integration-tests feature enabled. Run cargo tests --all-features"
"integration tests need the integration-tests feature enabled. Run cargo test --all-features"
);

struct ExpectedOutputTokens(Vec<Token>);
Expand Down

0 comments on commit c9c8fcf

Please sign in to comment.