Skip to content

Share more code with xml5ever #266

@SimonSapin

Description

@SimonSapin

Yes, after discussion in https://github.com/Ygg01/xml5ever/issues/30 we’ve moved the xml5ever code into this repository with the intention to share more code. However much of that has yet to happen. Rough plan:

  • Make every crate in the repo use a single workspace

  • Make sure Travis-CI is running every test

  • Rename the the html5ever_atoms crate to markup5ever and update html5ever and xml5ever to use it. This is a breaking change, so increment version numbers accordingly.

  • Make it so that users of either html5ever or xml5ever don’t need to have an explicit dependency to markup5ever (which should be an implementation detail). One way to do this is to have pub use markup5ever::*; at the root of each crate.

  • Find things that exist in both html5ever and xml5ever, and move them to markup5ever. Judge on a case-by-case basis when there are differences.

    For example TokenSink has some methods in common, but both parsers have some methods unique to it in their respective TokenSink. Since this trait is implemented by users of the libraries, the shared TokenSink should have the union of all methods (to support both parsers) and provide default implementations of methods where that makes sense (to reduce the overhead for users that only care about one parser).

    The Parser and BytesParser types in html5ever::driver are busted for handling </script>, we might want to remove them or redesign them. (Don’t bother adding it to xhtml5ever.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions