alexgorbatchev/SyntaxHighlighter — Issue #92: Perl's __END__ and __DATA__ markers interpreted incorrectly
Author: rafl
Created: 2012-02-19 15:47:08+00:00
State: open

Perl has two special markers, `__END__` and `__DATA__`, which signify the logical end of the program to the parser.

SyntaxHighlighter is aware of these two tokens, but handles them incorrectly, as demonstrated by https://metacpan.org/module/List::Gather#SYNOPSIS

`__END__` and `__DATA__` do /not/ end the program and cause the remainder of the input to be treated as non-code if they appear within a quoting construct.

Not being terribly sure how SyntaxHighlighter actually understands the Perl code it's dealing with and whether or not it's aware of it currently being in the context of a quoting construct when scanning for `__END__` and `__DATA__`, I believe it might be helpful to point out that, while those two tokens end the program in pretty much any position other than within quoting constructs, it's incredibly uncommon for them to be used in other ways than as single tokens on an otherwise empty line of input, only possibly prefixed with whitespace.