Perl: escaped characters not recognized after non-plain variables in double-quoted strings and regexes

Bug #249910 reported by Taylor Venable
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GtkSourceView
Expired
Medium
gtksourceview2 (Ubuntu)
Triaged
Low
Ubuntu Desktop Bugs

Bug Description

Problem Description:
Using Perl syntax highlighting, escaped characters like \" and \n are not recognized after using a non-special variable in a double-quoted string. An example: $foo = "\"$1\""; this would put the first capture in a regex between double-quotes. In this example, the first \" is recognized as escaped, but the second is not, thus the double-quote mark after the backslash is treated as the end of the string, and gtksourceview renders the rest of the document as an unterminated string, which is incorrect. The same issue occurs in regular expressions where variables are interpolated.

Possible Reason:
It perhaps arises from the difference between a plain-variable and a special-variable in the perl.lang specification file, probably in the "in-pattern" context near line 177 of /usr/share/gtksourceview-2.0/language-specs/perl.lang

Versions:
Ubuntu 8.04.1
gtksourceview 2.2.1-1
gedit 2.22.3-0ubuntu1

Revision history for this message
Taylor Venable (taylor-metasyntax) wrote :

I'm sorry, this should be filed under the package gtksourceview2 instead.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Yes, changing plain-variable to variable in line 177 seem to solve the problem, but it might have other effects. The best would be to report this upstream and see what they think.

Changed in gtksourceview:
status: New → Confirmed
Changed in gtksourceview:
status: Unknown → New
Changed in gtksourceview2:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Confirmed → Triaged
Changed in gtksourceview:
importance: Unknown → Medium
Changed in gtksourceview:
status: New → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.