Bug 379298

Summary: Syntax highliting not working properly for perl when using heredoc
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: zemmoura.khalil
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.37
Sentry Crash Report:

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