This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Remove begin/end matching for alphabetical character references #183
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.
Requirements
Description of the Change
This PR flat-out removes the failed attempt to match character references using a begin/end match until a
;
was encountered, as we do not have enough context to stop matching when it is clear that the ampersand in question does not signify a character reference.Alternate Designs
Keep the begin/end match but investigate ways to prevent runaway tokenization, such as by adding the list of all valid character references. I would like to implement that in the future but this PR is more meant to be a bugfix PR.
Benefits
More conservative tokenization regarding ampersands to prevent runaway character reference tokenization.
Possible Drawbacks
Setbacks to character reference autocompletion.
@DavidePastore @JonathanWolfe sorry to ping you two once again but I believe the only way character reference autocompletion will work is through manual text comparison, not by scopes.
Applicable Issues
Fixes #181