Skip to content

Conversation

@fb55
Copy link
Collaborator

@fb55 fb55 commented Mar 5, 2022

Currently, we override the end locations for html and body tags on EOF. body will now take the end position from a closing html tag, if there was no closing body tag.

This isn't the most elegant solution, so happy for any suggestions of how to improve things.

Currently, we override the end locations for `html` and `body` tags on EOF.

This isn't the most elegant solution, so happy for any suggestions of how to improve things.
@fb55 fb55 enabled auto-merge (squash) March 7, 2022 11:02
@fb55 fb55 merged commit 1525329 into master Mar 7, 2022
fb55 added a commit that referenced this pull request Mar 7, 2022
For some reason, we were escaping the data before. That meant we would only assert once that the received string matched the input.

Now, we properly walk the tree (depth first, from the deepest node), and test nodes along the way.

Requires #436
@fb55 fb55 deleted the fix/root-locs branch March 8, 2022 11:01
jmbpwtw pushed a commit to jmbpwtw/parse5 that referenced this pull request Feb 16, 2023
Before, we overrode the end locations for `html` and `body` tags on EOF. `body` will now take the end position from a closing `html` tag, if there was no closing `body` tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants