Closed kkuehlz closed 3 years ago
I can't merge this (permissions). If it looks good to you, feel free to send it.
Looks ok, but I'm a bit vary exposing this to the public. Would like it better if there were a few examples of usage.
It's mostly just API parity with the RcDom
. I'm moving a project from RcDom
to your crate, and you are able to create an RcDom
directly. This allowed us to extend the dom and do some work during the parse pass, then call the underlying method. Here is a code example if that helps. Your call though. I know this library makes no guarantees about API compatability with RcDom.
I'm happy to construct a small example to go in this lib if that's what you are looking for?
Not exposing html5ever in the public API of kuchiki was intentional, in order to minimize the API surface covered by SemVer.
Do you have a custom Sink
that wraps kuchiki’s? My first reaction is that at this level of desired customization you might also want some day have your own tree data structure, since representing cyclic data in Rust is so full of trade-offs. There’s not a lot of logic in kuchiki itself (as opposed to in its dependencies)
Yeah we have a custom sink wrapper. Linked in my previous comment. Anyway, if this was a design made deliberately, I don’t think you should change your API for my use case. We can just close this out.
This allows users to call parse_document with their own sink as follows: