Bug 77269

Summary: perl syntax highlightning not working correctly with regex when using \/
Product: [Applications] kate Reporter: Michael Virnstein <michael.virnstein>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: images showing the that "it works here"

Description Michael Virnstein 2004-03-11 11:09:05 UTC
Version:           3.0.1 (using KDE KDE 3.1.4)
Installed from:    Compiled From Sources
OS:          Linux

when i use e.g. the following code:
my $path = "/home/user/blah/";
$path =~ s/\/$//;
the syntax highlightning doesn't recognize that the / before $ in s/\/$// is "backslashed". Therefore the code after that line isn't highlighted correctly anymore.
Comment 1 Jens Dagerbo 2004-03-11 16:34:49 UTC
Syntax highlighting is done by katepart. Reassigning.
Comment 2 Anders Lund 2004-03-11 18:15:06 UTC
version 3.0.1 of what? Kate is currently at 2.2.

You should try updating the file KDEDIR/share/apps/katepart/syntax/perl.xml, you can grab it at http://kate.kde.org or use the "download" button in the highlight page of the editor dialog.

The latest available version is 1.10 i think. If that works, please close this bug, otherwise tell me here.
Comment 3 Michael Virnstein 2004-03-11 20:05:20 UTC
this bug was reported for KDevelop 3.0.1 on KDE 3.1.4, but was moved from "Jens Dagerbo" to kate as it seems.
Comment 4 Michael Virnstein 2004-03-11 20:16:14 UTC
i tested the new perl.xml from http://kate.kde.org but there's still the same problem when using KDevelop with the code above.
Comment 5 Anders Lund 2004-03-11 20:50:08 UTC
Created attachment 5178 [details]
images showing the that "it works here"

As you can see from the attached screenshot, it works here.
I haven't access to kde version 3.1.4 anymore, so my best suggestion is to use
the power of perl, and change your code to use a different delimiter:
	s|/$||;
if you have control over the source.

Apart from that, make sure that the new version of perl.xml is actually the one
used -- if you installed it in a global directory, make sure that you don't
have a local copy in ~/.kde (or whatever your KDEHOME is set to)

I also suggest you update your system if possible, katepart (and the whole of
KDE for that matter) has improved vastly since your version was released.
Comment 6 Anders Lund 2004-03-12 17:07:35 UTC
If nobody can confirm this over the weekend, I'll mark it as invalid on Monday.
Comment 7 Michael Virnstein 2004-03-14 15:26:32 UTC
With KDE 3.2.1 the problem is solved