Commit 346249e
committed
Bump version to 0.1.0
Improve and refactor client parser (#2)
- Use template element as the default parser
- For HTML that doesn't have high-level tags (no <html>, <head>,
or <body>)
- Fastest parser out of the three
- Doesn't load external resources like images when parsing
- Use `DOMImplementation` as fallback
- For HTML with tags like <head> or <body> (but no <html>)
- Second fastest parser out of the three
- Use `DOMParser` as final fallback or for parsing high-level tags
- For HTML with directive and/or <html> (can handle all cases)
- Slowest parser out of the three
- Make sure to remove extraneous elements (e.g., <head> or
<body>) if they're not in the HTML
- Improve regex matching, create constants, and cache values that
can optimize the parser1 parent 23fcfcc commit 346249e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments