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 141698 - Perl: variables aren't highlighted in strings
Perl: variables aren't highlighted in strings
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
1.0.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2004-05-03 04:45 UTC by Rodd Clarkson
Modified: 2007-07-13 16:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Rodd Clarkson 2004-05-03 04:45:40 UTC
gtksourceview ignores variables in strings instead of highlighting them.

Is it possible to check the type of string and then highlight variables where
appropriate.

Perl has both interpolated and uninterpolated strings (the former find the value
or the variables, etc, the later don't) and it would be great if variables
inside interpolated strings appeared as 'green' variables, instead of 'pink'
strings.
Comment 1 Gustavo Giráldez 2004-08-08 23:12:04 UTC
Changing summary for clarity.  I don't think this is easily fixable currently.
Comment 2 Ricardo Lenz 2005-06-01 20:01:43 UTC
this is just impossible to do right now. that's because gtksourceview currently
doesnt support a stack based highlighting engine AFAIK, ie, something like:

if found character " then
  enter string region

if inside string region then
  if found variable pattern then
     hilight variable inside string
  if found " then
     exit of string region

this would allow this type of thing rodd clarkson wants. heck, it would allow a
lot more things!

kate, on the kde, has this kind of thing. they use "push's" and "pop's" in the
syntax file to enter or go outside of "regions" / patterns, or something like that.

well, maybe i am wrong and gtksourceview already does it...?

anyway, i still prefer gnome and gedit :)
Comment 3 Patryk Zawadzki 2006-01-16 13:43:09 UTC
Should probably change the summary - it affects PHP files too (same as Perl - PHP has both 'unparsed' and "parsed" strings).
Comment 4 Steve Frécinaux 2007-07-04 10:42:10 UTC
There is a patch for that issue attached to bug #453638.
Comment 5 Steve Frécinaux 2007-07-13 16:04:56 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.