Bug 467271

Summary: stacked here-docs confuse the highlighter
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: Oswald Buddenhagen <ossi>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: REPORTED ---    
Severity: normal CC: walter.von.entferndt
Priority: NOR    
Version First Reported In: 5.103.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Oswald Buddenhagen 2023-03-13 10:47:02 UTC
as documented in https://perldoc.perl.org/perlop#EOF, it is possible to have multiple adjacent here-documents:

========
   print <<"foo", <<"bar"; # you can stack them
I said foo.
foo
I said bar.
bar
========

this isn't highlighted properly - the second here-doc isn't treated as such, which of course leads to all kinds of "interesting" followup effects when it contains quotes, etc.

for an example with some extra complexity, see https://github.com/git/git/blob/v2.39.2/git-send-email.perl#L843 (yes, github is bungling it, too :-D).