PackageTrack
Sign in Get early access

tl

Fast HTML parser written in pure Rust

0.7.8 4.1M downloads/mo #4964 most downloaded on crates.io y21/tl

What this package is like to depend on

Last release 3 years ago

no release in 18 months

Ships unpredictably

gaps range from 1 weeks to 1.4 years

Most releases are documented

notes for 20 of 24 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

24 releases · first in 2021

0 releases in the last 12 months

see the full history below

Release timeline

24 releases · Mar 2021 to Jan 2024
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 24
  1. 0.7.8 29 Jan 2024
    Release notes
    • Fixes a build error if compiled with the simd feature flag. See [y21/tl#60]
    • Fixes MDN-related doc comments ([y21/tl#51])
    Open source →
  2. 0.7.7 25 Aug 2022
    Release notes
    • Fixes a bug in the query selector parser that made it fail to parse values containing :. See y21/tl#46 and [y21/tl#47] for more details.
    Open source →
  3. 0.7.6 06 Aug 2022
    Release notes
    • Fixes a build error if compiled with the simd feature flag. See y21/tl#41 for more details.
    • ⚠ In prior versions, innerHTML() actually had the behavior of Element#outerHTML. This was changed and innerHTML now correctly only returns the markup of its subnodes, and not the markup of the own node.
    • outerHTML() was added to nodes, which moves the old behavior to another function.
    • Added children_mut(), which allows mutating the subnodes of an HTML Tag.
    Open source →
  4. 0.7.5 18 Apr 2022
    Release notes
    • Fixed a bug that caused the parser to parse closing tags incorrectly. See y21/tl#37 and y21/tl#38 for more details.
    Open source →
  5. 0.7.4 20 Mar 2022
    Release notes
    • Restructure internals (mainly SIMD functions)
    • Add fuzzing targets for internals
    • Optimize stable parser (adds stable alternatives when the simd feature isn't set)
    Open source →
  6. 0.7.3 19 Mar 2022
    Release notes
    • Fixed HTMLTag::raw() returning one byte less than it should have. See y21/tl#31.
    Open source →
  7. 0.7.2 08 Mar 2022
    Release notes
    • Add Attributes::contains(key) to check if an attribute exists.
    • Add Attributes::remove(key) to remove an attribute.
    • Add Attributes::remove_value(key) to delete the value of a given attribute key.
    Open source →
  8. 0.7.1 28 Feb 2022
    Release notes
    • Version bump in README.md
    Open source →
  9. 0.7.0 28 Feb 2022
    Release notes

    Warning: This release contains breaking changes

    • ⚠ Function signature of Attributes::insert has changed:
      • It now takes two generic parameters K, V instead of just one. Prior to this version, this meant that the key and value type had to match. See y21/tl#27 for more details.
    • Added a TryFrom<String> for Bytes implementation for convenience to create owned Bytes.
    • Added HTMLTag::boundaries method for obtaining the start and end position of a tag in the source string.
    • Fixed a panic when source string abruptly ends with <tag/
    Open source →
  10. 0.6.3 26 Feb 2022
    Release notes
    • Fixed a bug where Attributes::class() returned its id attribute instead of class. See y21/tl#26
    Open source →
  11. 0.6.2 06 Feb 2022
    Release notes
    • Fixed a bug where the slash in slash tags (<br />) is interpreted as > and causes the next > to be interpreted as a text node on its own.
    Open source →
  12. 0.6.1 06 Feb 2022
    Release notes
    • Fixed an off-by-one error in the QueryIterable trait implementation for HTMLTag that caused query selectors on HTML tags to return one node less than they should.
    Open source →
  13. 0.6.0 03 Feb 2022
    Release notes

    Warning: This release contains breaking changes

    • ⚠ Removed deprecated method VDom::find_node
      • Alternative: use VDom::nodes().iter().find(...) instead
    • Attributes::get() now returns a reference to Bytes instead of cloning.
      • Prior to this version, it wasn't necessary to return a reference as the Bytes type was just an immutable &[u8]. Now it can hold owned data.
    • HTMLTag::children() no longer returns an iterator, and instead returns a wrapper struct around the children of the HTML tag. This wrapper struct makes it easy to obtain direct children of the tag (Children::top()), or all children (including their children, etc...) (Children::all()).
    • Node::children() no longer returns an iterator (see above).
    • HTMLTag::name() now returns a reference to Bytes instead of cloning (see above).
    • Ability to create/parse query selectors independent of any parser (tl::parse_query_selector)
    • Ability to reuse query selectors
    • Ability to apply query selectors on HTMLTags (see #18)
    • queryselector module is now public
    • InnerNodeHandle is now u32
    • Remove unused max_depth parser option
    • Add convenience PartialEq<str> and PartialEq<[u8]> impls for Bytes
    Open source →
  14. 0.5.0 10 Jan 2022
    Release notes

    Warning: This release contains breaking changes

    • Allow Bytes to store owned data through Bytes::set()
      • ⚠ The maximum length for Bytes is u32::MAX
    • tl::parse() now returns Result<VDom<'a>, ParseError>
    • Attributes fields are no longer public, instead use one of the provided methods
    • HTMLTag::inner_html() now takes a &Parser and no longer directly returns the substring
      • Node mutations to the tag or any of its subnodes means inner_html needs to be recomputed
      • Consider using HTMLTag::raw() if you never mutate any nodes
    Open source →
  15. 0.4.4 27 Dec 2021
    Release notes
    • Parse unquoted attribute values properly (<a href=foo>) [#12]
    • Parse valueless attributes properly (<iframe allowfullscreen>) [#11]
    Open source →
  16. 0.4.3 16 Dec 2021
    Release notes
    • Add optional simd feature flag for SIMD-accelerated parsing
    Open source →
  17. 0.4.2 28 Nov 2021
    Release notes
    • Keep track of recursion depth when parsing to avoid overflowing the stack
    Open source →
  18. 0.4.1 27 Nov 2021
    Release notes
    • Fixed an infinite loop bug in parse_single and a panic that occurs when trying to parse incomplete markup tags (<!)
    Open source →
  19. 0.4.0 27 Nov 2021
    Release notes
    • Remove AsBytes trait in favor of From<T> for Bytes
    • Add VDom::query_selector()
    • Introduce InnerHandleNode to hide implementation details of NodeHandle
    • Make Attributes::is_class_member() generic over T: Into<Bytes<'a>>
    • Add Attributes::get_attribute()
    • Make HTMLTag::name() and HTMLTag::inner_html() return owned Bytes
    Open source →
  20. 0.3.0 22 Nov 2021
    Release notes
    • Deprecate VDom::find_node in favor of VDom::nodes().iter().find()
    Open source →
  21. 0.2.1 09 Apr 2021

    Nothing published for this version

  22. 0.2.0 27 Mar 2021

    Nothing published for this version

  23. 0.1.1 25 Mar 2021

    Nothing published for this version

  24. 0.1.0 24 Mar 2021

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive