Bug 16157 - syntax highlighting does not handle RegExp literals containing quotes well
Summary: syntax highlighting does not handle RegExp literals containing quotes well
Status: CLOSED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-11-27 09:45 PST by Adam van den Hoven
Modified: 2008-05-17 09:56 PDT (History)
0 users

See Also:


Attachments
Screenshot of the wrong syntax highlighting (55.73 KB, image/png)
2007-11-27 09:46 PST, Adam van den Hoven
no flags Details
Test case (127 bytes, text/html)
2007-11-27 22:45 PST, David Kilzer (:ddkilzer)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam van den Hoven 2007-11-27 09:45:01 PST
It seems that the syntax highlighting used with Drosera does not understand Regular Expression literals correctly. The following resulted in odd syntax highlighting:

replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, ']')
Comment 1 Adam van den Hoven 2007-11-27 09:46:01 PST
Created attachment 17556 [details]
Screenshot of the wrong syntax highlighting
Comment 2 David Kilzer (:ddkilzer) 2007-11-27 10:28:56 PST
Thanks for the bug report!  Which WebKit nightly were you using, e.g., rNNNNN?

Comment 3 Adam van den Hoven 2007-11-27 10:39:10 PST
(In reply to comment #2)
> Thanks for the bug report!  Which WebKit nightly were you using, e.g., rNNNNN?

I have R28024 and I'm attaching it to Safari 3.0.4(5523.10) since I couldn't find any other way to get Drosera
Comment 4 David Kilzer (:ddkilzer) 2007-11-27 21:45:34 PST
(In reply to comment #3)
> (In reply to comment #2)
> > Thanks for the bug report!  Which WebKit nightly were you using, e.g., rNNNNN?
> 
> I have R28024 and I'm attaching it to Safari 3.0.4(5523.10) since I couldn't
> find any other way to get Drosera

What happens if you use Drosera r28024 and attach it to WebKit nightly r28024.  Does it work then?
Comment 5 David Kilzer (:ddkilzer) 2007-11-27 22:43:57 PST
Confirmed with a local debug build of WebKit r28072 with Safari 3.0.4 (523.12) on Mac OS X 10.4.11 (8S165).

Comment 6 David Kilzer (:ddkilzer) 2007-11-27 22:45:01 PST
Created attachment 17569 [details]
Test case

1. Attach Drosera.
2. Open this attachment in a new tab or window.
3. View source code in Drosera.

Note highlighting issues.
Comment 7 Adam van den Hoven 2007-11-28 08:33:24 PST
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Thanks for the bug report!  Which WebKit nightly were you using, e.g., rNNNNN?
> > 
> > I have R28024 and I'm attaching it to Safari 3.0.4(5523.10) since I couldn't
> > find any other way to get Drosera
> 
> What happens if you use Drosera r28024 and attach it to WebKit nightly r28024. 
> Does it work then?

No. The syntax highlighting is still getting hung up on the regular expression literal. 

Comment 8 Timothy Hatcher 2008-05-17 09:39:13 PDT
We plan to replace the syntax highlighter for the Web Inspector and that will be used for the new debugger. Closing since Drosera doesn't exist anymore.
Comment 9 Timothy Hatcher 2008-05-17 09:56:07 PDT
Closing since Drosera has been replaced by the new Web Inspector debugger. Moving to the New Bugs component so the Drosera component can be closed and removed.