Bug 379298 - Syntax highliting not working properly for perl when using heredoc
Summary: Syntax highliting not working properly for perl when using heredoc
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-27 22:16 UTC by zemmoura.khalil
Modified: 2017-07-23 13:09 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zemmoura.khalil 2017-04-27 22:16:00 UTC
Hi,

Consider this perl code:


    $str = << '    EOS';
        this is my string
        and it's continuation
    EOS

$str2 = 'this is the second string';


the syntax highlighting is completely messy for all the code after it

To get it right again i have to get <<EOS>> at the beggining of the line and suppress the space in the docstring declaration as follow

    $str = << 'EOS';
        this is my string
        and it's continuation
EOS

Thank's for your efforts
Comment 1 Dominik Haumann 2017-07-23 13:09:30 UTC
Git commit 2f8a2406fc925583d7a1c548f99675e1815733c7 by Dominik Haumann.
Committed on 23/07/2017 at 13:09.
Pushed by dhaumann into branch 'master'.

Perl: Fix heredoc highlighting with leading spaces in the delimiter

FIXED-IN: 5.37

M  +4    -0    autotests/folding/highlight.pl.fold
M  +11   -0    autotests/html/highlight.pl.html
M  +11   -0    autotests/input/highlight.pl
M  +4    -0    autotests/reference/highlight.pl.ref
M  +4    -4    data/syntax/perl.xml

https://commits.kde.org/syntax-highlighting/2f8a2406fc925583d7a1c548f99675e1815733c7