tl
tl copied to clipboard
Fast, zero-copy HTML Parser written in Rust
Fixes #65 by adding a skip whitespace before and after the name of a closing tag. Also adds a test to verify that this functions properly, based on the example...
Fixes #54 by aligning the parsing of query selectors to the [Selectors Level 3 Recommendations]. Also adds tests for query selector parsing to verify the updated behavior. [Selectors Level 3...
With this example: ```rust fn main() -> () { let str = r#" div 1 div 2div 3 div 4 "#; let dom = tl::parse(str, Default::default()).unwrap(); let parser = dom.parser();...
This example will fail: ```rs fn main() -> () { let str = r#" hey "#; let dom = tl::parse(str, Default::default()).unwrap(); let parser = dom.parser(); let inner_html = dom .children()...
thanks for the library! truly appreciate it! the parser currently incorrectly finds tags inside of `` elements, so for example: ```html // a comment foo ``` will produce a ``...
I had some problems with `find_last_node_handle()` smashing its stack. This PR replaces the recursive version with an iteration that should have similar performance characteristics and which can safely parse inputs...
Would it be possible to allow `&[u8]` of something similar as input to `tl::parse` instead of `&str`, given that the parser uses an `u8` stream internally? This would avoid parsing...
Fixes #58
I encountered an issue where parsing breaks after a comment ending in `--->` instead of the usual `-->`: ```rust use tl::{parse, ParserOptions}; fn main() { let dom = parse(r#" "#,...
When parse illegal HTML like ` 1 `, the `div` tag won't close, and Chromium-like web engine accept it normally.