Skip to content
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

Match operator not highlighted when used in assignment #44

Open
chrstphrchvz opened this issue Oct 24, 2020 · 0 comments
Open

Match operator not highlighted when used in assignment #44

chrstphrchvz opened this issue Oct 24, 2020 · 0 comments

Comments

@chrstphrchvz
Copy link

Observed in Visual Studio Code 1.50.0.

A match operator will not be highlighted as regex if it uses / delimiters without the m prefix, is matching $_ implicitly, and is used in an assignment statement directly after the = (e.g. is not in parentheses).

Example code:

$_ = 'Hello world';
my ($match) = /Hello\s+(\S*)/;

image

One workaround is to use the m prefix:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant