ignore capture scopes for non consumed characters at yaml load time #215
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.
Fixes #176 by re-purposing the regex re-writer to find capture groups which are not inside lookarounds. If, in a YAML syntax definition, a scope stack is applied to a capture group inside a lookaround, (i.e.
captures:\n x: scope.stack goes.here
wherex
is the number of a capture group in a lookahead/behind,)syntect
will now ignore it, just like Sublime Text does. Because it does this work at YAML load time, and not parse time, the parsing speed will not be affected (or, rather, it will be slightly improved/reduced for some syntax definitions by having less capture groups to apply operations for).