GNOME Bugzilla – Bug 352701
Syntax highlighting does not respect escaped quotes
Last modified: 2006-12-29 16:48:10 UTC
Please describe the problem: syntax highlighting in bluefish 1.0.6rc2 does not show escaped quotes (double and single) correctly. The quoted string 'ends' at the escaped quote Steps to reproduce: 1. open a html or php file with quoted strings in it 2. turn on syntax highlighting 3. add an escaped quote inside a quoted string Actual results: The quoted string 'ends' at the escaped quote Expected results: The quoted string should enclose the escaped quote Does this happen every time? yes Other information:
Is this a new bug in 1.0.6rc2 or did you also see this in previous versions? I have not checked the changelog yet, but I can't recall any changes being made to either the HTML or PHP highlighting patterns.
That must have been an older bug. I have reinstalled 1.0.6rc1 and 1.0.5, renamed my ~/.bluefish and have not been able to get a working combination back again. I rarely update my ~/.bluefish/highlighting file because I have modified a few patterns - and I believe that does not happen automatically. But I did update it after installing 1.0.6rc2, so that bug popping up at that time must have been coincidence
Can you attach sample HTML and PHP files that show the problem?
Created attachment 71676 [details] Testcase 1- double quotes
Created attachment 71677 [details] Testcase 2 - single quotes
I have attached two php files for single and double quotes. I have omitted a html testcase because on second thought it does not make sense to escape quotes in pure html, afaik no browser would understand that.
Try replacing the two lines below in your ~/.bluefish/highlighting file. See if the changes break anything. replace these: patterns: php:String (single quoted):0:'.*?'::2:^PHP Block$:#009900::1:1: patterns: php:String (double quoted):0:".*?"::2:^PHP Block$:#009900::1:1: with: patterns: php:String (single quoted):0:':':1:^PHP Block$:#009900::1:1: patterns: php:String (double quoted):0:":":1:^PHP Block$:#009900::1:1:
This fix resolves the problem and I have not noticed any unwanted side effects after a day of working on php files with bluefish
*** Bug 387103 has been marked as a duplicate of this bug. ***