-
-
Notifications
You must be signed in to change notification settings - Fork 0
test: guard the runtime sets both sides depend on #52
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d335ebf
test: guard the runtime sets both sides depend on
michen00 bf164ae
fix(scan): compare the whole lowercase mapping
michen00 a2b31ab
test: check every whitespace API, not just strip
michen00 9d8bd88
docs(test): name what omits the four separators
michen00 643ae81
docs(scan): name the function the guard describes
michen00 a476a98
test: sweep the range once, not once per API
michen00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
corpus/cases/a-dotted-capital-i-does-not-close-an-html-block/case.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| name: A closing tag spelled with a dotted capital I does not close the block | ||
| why: The other character outside ASCII whose lowercase reaches into it, and it reaches differently: `U+0130` folds to two code points, an `i` and a combining dot, so `</D{DOTTED CAPITAL I}V>` becomes `</di_v>` with the dot between and never matches `</div>`. The block therefore stays open and nothing after it joins. This is the case that says the fold is a containment test rather than an offset: a length-changing fold is safe here only because no position in the folded line is used to slice the original, and a port that folded in place and then indexed by the result would read past its own line. It sits beside the Kelvin case because the two together are every character that can reach this path. | ||
| paragraphs_unwrapped: 0 | ||
| line_breaks_removed: 0 |
5 changes: 5 additions & 0 deletions
5
corpus/cases/a-dotted-capital-i-does-not-close-an-html-block/expected.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <div> | ||
| raw html here | ||
| </DİV> | ||
| wrapped prose | ||
| here. |
5 changes: 5 additions & 0 deletions
5
corpus/cases/a-dotted-capital-i-does-not-close-an-html-block/input.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <div> | ||
| raw html here | ||
| </DİV> | ||
| wrapped prose | ||
| here. |
4 changes: 4 additions & 0 deletions
4
corpus/cases/a-kelvin-sign-folds-into-an-html-closing-tag/case.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| name: A closing tag spelled with a Kelvin sign still closes the block | ||
| why: An HTML block ends where its closing tag appears, and the tool finds that tag by lowercasing the whole line and looking for an ASCII needle. Lowercasing is the one thing this transform still takes from the runtime rather than stating itself, and the reason it cannot be narrowed to ASCII is here: `U+212A` is not ASCII and its lowercase is, so `</BLOC{KELVIN SIGN}QUOTE>` folds to `</blockquote>` and closes the block, and the prose after it is prose. An implementation folding only ASCII leaves the block open to the end of the file and joins nothing, which is what the counts on this case separate. Only two characters outside ASCII fold into it -- this one and the dotted capital I in the sibling case -- so the pair covers the whole of what that dependency can reach. | ||
| paragraphs_unwrapped: 1 | ||
| line_breaks_removed: 1 |
4 changes: 4 additions & 0 deletions
4
corpus/cases/a-kelvin-sign-folds-into-an-html-closing-tag/expected.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <blockquote> | ||
| raw html here | ||
| </BLOCKQUOTE> | ||
| wrapped prose here. |
5 changes: 5 additions & 0 deletions
5
corpus/cases/a-kelvin-sign-folds-into-an-html-closing-tag/input.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <blockquote> | ||
| raw html here | ||
| </BLOCKQUOTE> | ||
| wrapped prose | ||
| here. |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.