Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Highlights entire file as regex if regex is followed by '?' #74

Open
alexchandel opened this issue Jul 26, 2016 · 0 comments
Open

Highlights entire file as regex if regex is followed by '?' #74

alexchandel opened this issue Jul 26, 2016 · 0 comments
Labels

Comments

@alexchandel
Copy link

Consider the following legal Perl program:

$_ = $_ =~ /this never ends/i? "still highlighted": "still highlighted";

print "$_\n";

Unless there's a space between the regex's i flag and ? that begins the ternary operation, Perl highlights the rest of the file as a regex. Even GitHub's trash highlighter does this apparently.

Tellingly, the following variation is mishighlighted the same way:

$_ = $_ =~ /this never ends/? "still highlighted": "still highlighted";

print "$_\n";
@winstliu winstliu added the bug label Jul 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants