Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ETagRequired error range #897

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

angelozerr
Copy link
Contributor

Improve ETagRequired error range

Fixes #876

Signed-off-by: azerr [email protected]

@angelozerr angelozerr force-pushed the ETagRequired2 branch 12 times, most recently from efcfbaa to a043eb3 Compare October 5, 2020 13:47
@angelozerr angelozerr marked this pull request as ready for review October 5, 2020 13:48
@angelozerr
Copy link
Contributor Author

This PR fixes error range for ETAgrequired, the main idea is to higlight the error from the start tag which is broken to the offset reported by Xerces:

image

The start tag can be broken because:

  • it has not an end tag
  • it has an end tag but it contains </ which breaks the XML.

As I had to fix CloseStartTagAction which is used for several error code,this PR fixes several issues:

@datho7561
Copy link
Contributor

For cases like this:

<a>
  <c><b>
</a>

the opening < of </a> is highlighted in the error range:

Screenshot from 2020-10-05 10-01-02

I find this behaviour odd, since the closing tag should appear before </a>. As well, </a> is correct; it closes the <a> tag.

@angelozerr
Copy link
Contributor Author

the opening < of is highlighted in the error range:

fixed

@angelozerr angelozerr force-pushed the ETagRequired2 branch 2 times, most recently from 5428526 to 3fa6e41 Compare October 9, 2020 08:05
@angelozerr
Copy link
Contributor Author

@datho7561 please review my PR (with vscode-xml and see if my code is understandable). Thanks

@angelozerr angelozerr force-pushed the ETagRequired2 branch 3 times, most recently from 281c085 to e7a9dd6 Compare October 9, 2020 16:19
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.

Improve ETagRequired error range
2 participants