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 2024Releases
latest 24-
0.7.829 Jan 2024Release notes
Open source →- Fixes a build error if compiled with the
simdfeature flag. See [y21/tl#60] - Fixes MDN-related doc comments ([y21/tl#51])
- Fixes a build error if compiled with the
-
0.7.725 Aug 2022Release notes
Open source →- 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.
- Fixes a bug in the query selector parser that made it fail to parse values containing
-
0.7.606 Aug 2022Release notes
Open source →- Fixes a build error if compiled with the
simdfeature flag. See y21/tl#41 for more details. - ⚠ In prior versions,
innerHTML()actually had the behavior ofElement#outerHTML. This was changed andinnerHTMLnow 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.
- Fixes a build error if compiled with the
-
0.7.518 Apr 2022 -
0.7.420 Mar 2022Release notes
Open source →- Restructure internals (mainly SIMD functions)
- Add fuzzing targets for internals
- Optimize stable parser (adds stable alternatives when the
simdfeature isn't set)
-
0.7.319 Mar 2022Release notes
Open source →- Fixed
HTMLTag::raw()returning one byte less than it should have. See y21/tl#31.
- Fixed
-
0.7.208 Mar 2022Release notes
Open source →- 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.
- Add
-
0.7.128 Feb 2022 -
0.7.028 Feb 2022Release notes
Open source →Warning: This release contains breaking changes
- ⚠ Function signature of
Attributes::inserthas changed:- It now takes two generic parameters
K, Vinstead 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.
- It now takes two generic parameters
- Added a
TryFrom<String> for Bytesimplementation for convenience to create ownedBytes. - Added
HTMLTag::boundariesmethod for obtaining the start and end position of a tag in the source string. - Fixed a panic when source string abruptly ends with
<tag/
- ⚠ Function signature of
-
0.6.326 Feb 2022Release notes
Open source →- Fixed a bug where
Attributes::class()returned its id attribute instead of class. See y21/tl#26
- Fixed a bug where
-
0.6.206 Feb 2022Release notes
Open source →- 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.
- Fixed a bug where the slash in slash tags (
-
0.6.106 Feb 2022Release notes
Open source →- Fixed an off-by-one error in the
QueryIterabletrait implementation forHTMLTagthat caused query selectors on HTML tags to return one node less than they should.
- Fixed an off-by-one error in the
-
0.6.003 Feb 2022Release notes
Open source →Warning: This release contains breaking changes
- ⚠ Removed deprecated method
VDom::find_node- Alternative: use
VDom::nodes().iter().find(...)instead
- Alternative: use
- ⚠
Attributes::get()now returns a reference toBytesinstead of cloning.- Prior to this version, it wasn't necessary to return a reference as the
Bytestype was just an immutable&[u8]. Now it can hold owned data.
- Prior to this version, it wasn't necessary to return a reference as the
- ⚠
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 toBytesinstead 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) queryselectormodule is now publicInnerNodeHandleis now u32- Remove unused
max_depthparser option - Add convenience
PartialEq<str>andPartialEq<[u8]>impls for Bytes
- ⚠ Removed deprecated method
-
0.5.010 Jan 2022Release notes
Open source →Warning: This release contains breaking changes
- Allow
Bytesto store owned data throughBytes::set()- ⚠ The maximum length for
Bytesisu32::MAX
- ⚠ The maximum length for
- ⚠
tl::parse()now returnsResult<VDom<'a>, ParseError> - ⚠
Attributesfields are no longer public, instead use one of the provided methods - ⚠
HTMLTag::inner_html()now takes a&Parserand no longer directly returns the substring- Node mutations to the tag or any of its subnodes means
inner_htmlneeds to be recomputed - Consider using
HTMLTag::raw()if you never mutate any nodes
- Node mutations to the tag or any of its subnodes means
- Allow
-
0.4.427 Dec 2021Release notes
Open source →- Parse unquoted attribute values properly (
<a href=foo>) [#12] - Parse valueless attributes properly (
<iframe allowfullscreen>) [#11]
- Parse unquoted attribute values properly (
-
0.4.316 Dec 2021 -
0.4.228 Nov 2021Release notes
Open source →- Keep track of recursion depth when parsing to avoid overflowing the stack
-
0.4.127 Nov 2021Release notes
Open source →- Fixed an infinite loop bug in
parse_singleand a panic that occurs when trying to parse incomplete markup tags (<!)
- Fixed an infinite loop bug in
-
0.4.027 Nov 2021Release notes
Open source →- Remove
AsBytestrait in favor ofFrom<T> for Bytes - Add
VDom::query_selector() - Introduce
InnerHandleNodeto hide implementation details ofNodeHandle - Make
Attributes::is_class_member()generic overT: Into<Bytes<'a>> - Add
Attributes::get_attribute() - Make
HTMLTag::name()andHTMLTag::inner_html()return ownedBytes
- Remove
-
0.3.022 Nov 2021 -
0.2.109 Apr 2021Nothing published for this version
-
0.2.027 Mar 2021Nothing published for this version
-
0.1.125 Mar 2021Nothing published for this version
-
0.1.024 Mar 2021Nothing published for this version