Age | Commit message (Collapse) | Author | |
---|---|---|---|
2023-08-19 | refactor: add default for S type param of DefaultEmitter | Martin Fischer | |
2023-08-19 | test: split up span test | Martin Fischer | |
2023-08-19 | refactor!: remove current_is_appropriate_end_tag_token from Emitter | Martin Fischer | |
2023-08-19 | refactor: proxy essential Emitter methods through Tokenizer | Martin Fischer | |
2023-08-19 | break!: stop re-exporting reader traits & types | Martin Fischer | |
This is primarily done to make the rustdoc more readable (by grouping Reader, IntoReader, StringReader and BufReadReader in the reader module). Ideally IntoReader is already implemented for your input type and you don't have to concern yourself with these traits / types at all. | |||
2023-08-19 | docs: remove `crate::` from link labels | Martin Fischer | |
2023-08-19 | docs: move `produce ("emit")` clue to Emitter doc | Martin Fischer | |
2023-08-19 | break!: merge Tokenizer::new_with_emitter into Tokenizer::new | Martin Fischer | |
The Tokenizer does not perform any state switching, since proper state switching requires a feedback loop between tokenization and DOM tree building. Using the Tokenizer directly therefore is a bit of a pitfall, since you might not expect it to e.g. tokenize `<script><b>` as: StartTag(StartTag { name: "script", .. }) StartTag(StartTag { name: "b", .. }) Since we don't want to make walking into pitfalls particularly easy, this commit changes the Tokenizer::new method so that you have to specify the Emitter. Since this makes new_with_emitter redundant it is removed. | |||
2023-08-19 | docs: move note about Reader impls to Reader trait | Martin Fischer | |
2023-08-19 | break!: remove Default impl for Attribute | Martin Fischer | |
2023-08-19 | break!: remove Default impls for StartTag and EndTag | Martin Fischer | |
2023-08-19 | refactor: decouple html5lib_tests from html5tokenizer | Martin Fischer | |
Previously we mapped the test tokens to our own token type. Now we do the reverse, which makes more sense as it enables us to easily add more detailed fields to our own token variants without having to worry about these fields not being present in the html5lib test data. (An alternative would be to normalize the values of these fields to some arbitrary value so that PartialEq still holds but seeing such normalized fields in the diff printed by pretty_assertions on a test failure would be quite confusing). | |||
2023-08-19 | chore(html5lib_tests): simplify control flow | Martin Fischer | |
2023-08-19 | refactor: split off reusable html5lib_tests crate | Martin Fischer | |
2023-08-19 | refactor: separate test logic from html5lib-test parsing | Martin Fischer | |
2023-08-19 | break!: privatize PosTrackingReader fields | Martin Fischer | |
2023-08-19 | break!: rename PosTracker to PosTrackingReader | Martin Fischer | |
2023-08-19 | break!: remove Never in favor of std::convert::Infallible | Martin Fischer | |
This change is a backport of 04e6cbe[1] from html5gum. [1]: https://github.com/untitaker/html5gum/commit/04e6cbe44bb7a388bd61d1c9cfe4c618eb3b0e29 | |||
2023-08-19 | break!: remove InfallibleTokenizer in favor of Iterator::flatten | Martin Fischer | |
2023-08-19 | docs: remove Tokenizer::new examples from Reader docs | Martin Fischer | |
2023-08-19 | break!: rename Readable to IntoReader | Martin Fischer | |
The trait of the standard library is also called IntoIterator and not Iterable. | |||
2023-08-19 | fix(docs): remove outdated list of Readable impls | Martin Fischer | |
dced8066f77f570dd3e396ec3570c71aa86c454e introduced a Readable impl for std::io::BufReader. Manually listing impls in a doc comment is a bad idea since such lists will just get out of date and there's no need for that since rustdoc automatically lists all implementations on the trait page. | |||
2023-08-19 | fix(docs): fix Error variant doc saying `$literal` | Martin Fischer | |
2023-08-19 | fix(docs): Span is a byte range (not character range) | Martin Fischer | |
2023-08-19 | fix(docs): StartTag is a start tag | Martin Fischer | |
2023-08-19 | fix(docs): Error::EndTagWithAttributes should be emitted by emit_current_tag | Martin Fischer | |
2023-08-19 | test: enable previously skipped tokenizer test | Martin Fischer | |
2023-08-19 | break!: remove StartTag::next_state | Martin Fischer | |
You shouldn't manually have to match tokens yielded by the tokenizer iterator just to correctly handle state transitions. A better NaiveParser API will be introduced. | |||
2023-08-19 | break!: remove set_last_start_tag from Emitter | Martin Fischer | |
2023-08-19 | refactor: move html5lib test to own crate to fix `cargo test` | Martin Fischer | |
Previously `cargo test` failed because it ran the test_html5lib integration test, which depends on the integration-tests feature (so you always had to run `cargo test` with `--features integration-tests` or `--all-features`, which was annoying). This commit moves the integration tests to another crate, so that the dependency on the feature can be properly defined in a way so that `cargo test` just works and runs the test. | |||
2023-08-19 | chore: drop test-generator dev-dependency | Martin Fischer | |
I want to move the test_html5lib integration test to a separate crate so that it can properly depend on the integration-tests feature in a way so that `cargo test` just works and runs the integration test. (Currently `cargo test` fails since test_html5lib depends on that feature.) However test_html5lib currently depends on the test-generator crate and test-generator doesn't support Cargo workspaces[1] and appears to be unmaintained. This commit therefore drops the test-generator dev-dependency. [1]: https://github.com/frehberg/test-generator/issues/6 | |||
2021-12-05 | rename to html5tokenizer, bump versionv0.4.0 | Martin Fischer | |
2021-12-05 | spans: get rid of code duplication by introducing Span trait | Martin Fischer | |
2021-12-05 | spans: refactor to avoid one clone() | Martin Fischer | |
2021-12-05 | rename internal emit_error to push_error (to avoid confusion with trait method) | Martin Fischer | |
2021-12-05 | improve duplicate attribute span | Martin Fischer | |
2021-12-05 | refactor: match btree_map::Entry instead of using and_modify closure | Martin Fischer | |
2021-12-05 | spans: slightly refactor DefaultEmitter | Martin Fischer | |
2021-12-05 | spans: add spans to Token::Error | Martin Fischer | |
2021-12-05 | spans: fix spans for quoted attribute values | Martin Fischer | |
2021-12-05 | spans: support attribute values | Martin Fischer | |
2021-12-05 | spans: support attribute names | Martin Fischer | |
2021-12-05 | spans: add span tests | Martin Fischer | |
2021-12-05 | spans: start implementing SpanEmitter | Martin Fischer | |
2021-12-05 | spans: introduce PosTracker | Martin Fischer | |
2021-12-05 | spans: introduce GetPos trait | Martin Fischer | |
2021-12-05 | spans: rename to SpanEmitter, adjust generics | Martin Fischer | |
2021-12-05 | spans: copy DefaultEmitter to new span module | Martin Fischer | |
2021-12-05 | spans: make Emitter generic over Reader | Martin Fischer | |
2021-12-05 | spans: make Emitter generic over Span | Martin Fischer | |