After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 582545 - Perl: incorrectly highlights any / after operator as start of match
Perl: incorrectly highlights any / after operator as start of match
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
git master
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 562735 693597 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-05-13 22:11 UTC by Sebastien Bacher
Modified: 2013-03-29 18:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Sebastien Bacher 2009-05-13 22:11:22 UTC
The bug has been described on https://bugs.launchpad.net/bugs/247877

"In Perl highlighting, everything following a slash is treated like a string. Below this is incorrect:

print($i++/2);"
Comment 1 Carnë Draug 2011-05-13 20:51:56 UTC
I can confirm this bug is still present on trunk version.
Comment 2 Carnë Draug 2013-03-01 19:25:31 UTC
I tracked down the problem to the following lines in perl.lang (one of the included contexts in "match-slashslash")

        <context style-inside="true" style-ref="regex">
          <start>\%{operator}\s*(/)</start>
          <end>/[cgimosx]*</end>

This is what makes things such as

=~ /regexp/

be highlighted properly. I'm think that reducing \%{operator} to the !~ and =~ opeartors should be enough. It will fix this bug at least and should cover all the cases that appear in code following recommended style.
Comment 3 Carnë Draug 2013-03-01 20:50:09 UTC
*** Bug 562735 has been marked as a duplicate of this bug. ***
Comment 4 Carnë Draug 2013-03-01 21:28:21 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

Fingers crossed that it will not pour in even more bugs.

http://git.gnome.org/browse/gtksourceview/commit/?id=362b7f909c3a7d7f751e5e8efdcdb61c61afc790
Comment 5 Carnë Draug 2013-03-29 18:07:09 UTC
*** Bug 693597 has been marked as a duplicate of this bug. ***