GNOME Bugzilla – Bug 141698
Perl: variables aren't highlighted in strings
Last modified: 2007-07-13 16:04:56 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.
Changing summary for clarity. I don't think this is easily fixable currently.
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 :)
Should probably change the summary - it affects PHP files too (same as Perl - PHP has both 'unparsed' and "parsed" strings).
There is a patch for that issue attached to bug #453638.
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.