Bug 114675 - kate: bash syntax highlighting wrong for $(...<<EOF)
Summary: kate: bash syntax highlighting wrong for $(...<<EOF)
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-19 11:46 UTC by Toralf Förster
Modified: 2007-12-30 21:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster 2005-10-19 11:46:57 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8) 
OS:                Linux

See the following code snipped kate has problem after the second call to bc. Syntax Highlighting works well if I use `...` instead of $(...)

#!/bin/sh
#

#	no problem
#
PERCENT1=`bc <<EOF
scale=5
4.0 / 3
EOF`

echo "perc1=${PERCENT1}"

# second attempt
PERCENT2=$(bc <<EOF
scale=5
5.0 / 3
EOF)

# no colour from here
#
echo "perc2=${PERCENT2}"

exit 0
Comment 1 Anders Lund 2005-11-01 18:57:32 UTC
Wilbert Beehrendsen, maintainer of the bash highlight does not appear to have a bugzilla account. his email is wilbert at kde nl.
Comment 2 Toralf Förster 2005-12-04 21:56:15 UTC
emailed him at 1st of Nov but didn#t got any answer until now :-(
Comment 3 Thomas Friedrichsmeier 2007-12-13 16:48:48 UTC
Confirming this happens in both KDE 3.5.8 and KDE 4. Bash itself is happy with these constructs, so the highlighting is wrong.
Comment 4 Wilbert Berendsen 2007-12-30 20:26:37 UTC
I am very sorry this took so long. Yes I have a bugzilla account.... and right now I will look into this bug.
Comment 5 Wilbert Berendsen 2007-12-30 21:11:55 UTC
SVN commit 754823 by berendsen:


BUG: 114675

make it so that the heredoc-delimiter ends on a
word boundary (\b) instead on an EOL. This way an
additional ) or ` is not missed. It is still not
perfect, because it now allows for other texts
after the delimiter. But bigger changes are need-
ed to defeat that...

 M  +5 -5      bash.xml  


WebSVN link: http://websvn.kde.org/?view=rev&revision=754823