Conversation
- consistently detect current tagName - report all possible cases as fatalError - update tests for reported errors - properly report missing attribute value (not in HTML) BREAKING-CHANGE: Reports more not well-formed documents as fatalError. Closes: #45
BREAKING-CHANGE: Drops incomplete and broken support for unclosed and optional end tags in HTML, which was creating a similar looking but wrong DOM anyways, if there was any content after the unclosed tag. Closes #467
and occurrences of Unicode replacement character `\ufffd` as fatalError. https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character https://nodejs.dev/en/api/v18/buffer/#buffers-and-character-encodings
karfau
commented
Jul 25, 2023
and make it harder to break/have false positives for the tests in the future
and report missing entries in REPORTED as `todo` tests, which are treated like skip but counted separately. Some can not easily be tested since there is no known test cases, but the ones added in the current PR should now checked.
| const data = JSON.stringify(LINE_TO_ERROR_INDEX, null, 2); | ||
| const currentData = fs.existsSync(REPORTED_JSON) ? fs.readFileSync(REPORTED_JSON, 'utf8') : ''; | ||
| if (data !== currentData) { | ||
| fs.writeFileSync(REPORTED_JSON, data, 'utf8'); |
Check failure
Code scanning / CodeQL
Potential file system race condition
Member
Author
There was a problem hiding this comment.
The additional check just avoids writing the file on every test run if the content doesn't change, which would trigger an endless loop when running the tests in watch mode. It's not relevant for the published code.
This was referenced Sep 26, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fatalErrorwill throw aParseErrorand stop processing the document:<in AttrValue as fatalError (only in XML documents)\ufffderrordoesn't stop processing unlessonErrorStopParsingor a similar method is used:BREAKING-CHANGE: Reports more not well-formed documents as fatalError and drop broken support for optional and unclosed tags in HTML.
Closes #45
Closes #125
Closes #467