You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
citry_html_transform builds its HTML trees with markup5ever_rcdom. That crate is compiled into the citry_core wheel, but html5ever's maintainers keep it only for their own tests. Its crates.io description reads "Basic, unsupported DOM structure for use by tests in html5ever/xml5ever". We shouldn't depend on it in code we ship.
html5ever's public way to build a tree is its TreeSink trait, so Citry can own a small tree that implements it.
What we want
Add a tree type in citry_html_transform that implements TreeSink. It keeps nodes in one Vec and does not scan a parent's children to place a node.
Move output_scanner.rs, static_html.rs, hydration_structure.rs and html_limits.rs to it.
Keep markup5ever_rcdom as a dev-dependency only, as the reference that the new tree is compared against in tests.
Done when
markup5ever_rcdom is gone from [dependencies].
A test parses a varied set of HTML with both trees and finds them equal.
The output checks and the hydration check give the same results as before.
Activity