-
Notifications
You must be signed in to change notification settings - Fork 116
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
scope name capture substitution seem to trigger only once #147
Comments
I can confirm that this seems to work as expected in Atom (1.41 and 1.54). (However note that Atom considers the entire string as a single scope, instead of two, and this causes some issues with how themes apply) I think I have tracked this down to a lack of a
Where n refers to the capture group contents to be substituted. |
Add the global modifier to the regex that handles scope name capture substitutions for instances where more than one substitution exists. Fixes microsoft#147
Add the global modifier to the regex that handles scope name capture substitutions for instances where more than one substitution exists. Fixes microsoft#147
Implements a test for issue microsoft#147, to insure that multiple substitutions on a single scope specification are handled.
With a scope reference such as:
The
$0
replacement only seems to happen on the first instance, as I get the following result:My understanding is that these are equivalent to regex replacements (only nothing is getting replaced), and of all the regex engines I have used the 'replace' function on seem to handle multiple references to the same capture.
However, I cannot confirm any other TextMate based editor works differently, though I will be able to try Atom at some point.
The text was updated successfully, but these errors were encountered: