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 #133.
This corrects the regex used for matching
$$
,$^
and$?
automatic variables. This occurs because the current regex can be simplified to\$[$^?]\b
, but the\b
(word boundary) fails if one of the two characters tested at the boundary is not a word character (one must be a word, one must not be a word, and the set[$^?]
contains no word characters). As such, only very limited cases would have successfully matched. A boundary test is not required for these particular patterns.$_
is not affected because_
is a word character, and so it has been left in the part of the regex that still applies the boundary test (and is actually required).This also fixes the mismatch of scopes for these same variables and the larger set specified in the same regex(s), between
#variable
and#variableNoProperty
, by adoptingsupport.variable.automatic.powershell
in both places.Tests have been corrected for the scope change, and then updated to include tests specific to the two conditions being resolved.