GNOME Bugzilla – Bug 582545
Perl: incorrectly highlights any / after operator as start of match
Last modified: 2013-03-29 18:07:09 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);"
I can confirm this bug is still present on trunk version.
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.
*** Bug 562735 has been marked as a duplicate of this bug. ***
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
*** Bug 693597 has been marked as a duplicate of this bug. ***