-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for parsing top-level and trailing text nodes. (#12)
* When there are top-level text nodes, add them to the results array instead of one level up when at level 0. * Make sure we calculate the correct end of the text node when it's the last node in the html string. * Add tests to verify parser behavior on top-level and trailing text nodes. * We ought to drop text nodes that are nothing but whitespace since not useful in HTML. * Update tests for dropping whitespace-only nodes.
- Loading branch information
Showing
2 changed files
with
89 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters