[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: Bug#27918: Perl syntax highlighting messed up after a foreach including a string variable (prefixed
From: rhkramer () fast ! net
Date: 2001-06-30 13:13:27
[Download RAW message or body]
Package: kwrite
Version: 2.0 (using KDE 2.1.0 )
Severity: normal
Installed from: Linux-Mandrake 7.2 (unsupported)
Compiler: gcc version 2.95.3 19991030 (prerelease)
OS: Linux 2.2.17-21mdk i686
OS/Compiler notes:
Hope this is readable -- I've double spaced between paragraphs because of past \
problems with similar "TEXTAREA" input boxes.
When a Perl program contains a foreach statement with a string variable (see example \
below), syntax highlighting is messed up afterwards -- one particular example is that \
comments are displayed in red (i.e., as a string) instead of in gray (as a comment).
The following example will reproduce the behavior, in either a Perl program (with the \
shebang) or a Perl module (without the shebang). Just paste this into a file, view \
it in kwrite with Perl syntax highlighting turned on, and look at the comment "test".
If you comment out the first line, or delete the $ from "$text", the syntax \
highlighting is OK.
I reviewed bugs 14548, 16325, 22401 (and a few others), and I don't think this \
duplicates any of them. I do note in your reply to 14548 reference to a rewrite \
being required anyway (around 4/8/01), so maybe this bug will be fixed in the course \
of that rewrite anyway.
Hope this helps!
Randy Kramer
foreach( split( /\n/, $text ) ) {
if( /^\s+\*\sSet\sGROUP\s*\=\s*(.*)/ ) {
if( $1 ) {
@glist = prvGetUserList( $1 );
}
}
}
# test
(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic