Bug 467271 - stacked here-docs confuse the highlighter
Summary: stacked here-docs confuse the highlighter
Status: REPORTED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (other bugs)
Version First Reported In: 5.103.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-13 10:47 UTC by Oswald Buddenhagen
Modified: 2023-03-13 10:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).