#1500 Bash: Fix quoted HereDoc delimiters handling

Bug
closed-fixed
5
2013-08-31
2013-07-22
No

Bash quoted HereDoc delimiters seem to allow pretty much anything as part of the delimiter, not only identifiers. E.g. the following snippet is valid:

cat << EOF
line1
line2
EOF

echo "ouside"

cat << '\A \\B \'
line1
line2
\A \\B \

echo "ouside"

cat << "\A \\B \"C"
line1
line2
\A \B "C

echo "ouside"

Currently the Bash lexer doesn't handle quoted delimiter differently from non-quoted ones apart from the quotes themselves, which leads to broken highlighting if a quoted delimiter contains anything but an identifier.

Attached is a patch fixing the issue by properly handling the quoted delimiters.

1 Attachments

Discussion

  • Kein-Hong Man

    Kein-Hong Man - 2013-07-22

    I'm occupied with other things at the moment; looks fine by me. Perl coders seem to be amazingly good at hitting corner cases... :-p

     
  • Neil Hodgson

    Neil Hodgson - 2013-07-23
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2013-08-31
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks