Open alexr00 opened 2 years ago
Looking at the highlighter code
It looks like regex strings can only come after (
, {
, ~
, &
, |
, if
, unless
or a newline.
in your example, the regex is after a =
, which isn't supported
As a temp work around, you can just surround the regex with brackets (or any of the other valid character)
Or add =
to the list of allowed characters
https://github.com/textmate/perl.tmbundle/blob/a85927a902d6e5d7805f56a653f324d34dfad53a/Syntaxes/Perl.plist#L1174
Should make report to: https://github.com/textmate/perl.tmbundle
Originally from @RedCMD in https://github.com/microsoft/vscode/issues/154706
On Mon, 2022-07-11 at 00:50 -0700, Alex Ross wrote:
Looking at the highlighter code It looks like regex strings can only come after (, {, ~, &, |, if, unless or a newline. in your example, the regex is after a =, which isn't supported image As a temp work around, you can just surround the regex with brackets (or any of the other valid character) image Or add = to the list of allowed characters
Huh! Thank you, that is very helpful!
image image https://github.com/textmate/perl.tmbundle/blob/a85927a902d6e5d7805f56a653f324d34dfad53a/Syntaxes/Perl.plist#L1174 Should make report to: https://github.com/textmate/perl.tmbundle Originally from @RedCMD in microsoft/vscode#154706 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Regular expression breaks syntax highlighting for remainder of the file. The offending line (perl) is here:
The *'s after each \s seem to be relevant; deleting one fixes the formatting (but deleting two breaks it again).
Steps to Reproduce:
Originally from @zaharazod in https://github.com/microsoft/vscode/issues/154706