If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Syntax highlighter/coloring get confused by quotes in X/HTML comment

NEW
Assigned to

Status

Other Applications
Venkman JS Debugger
14 years ago
10 years ago

People

(Reporter: Jamie Flournoy, Assigned: Robert Ginda)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6b) Gecko/20031114

In the "loaded scripts" pane, the function list is missing one of the two JS
functions in the attached valid XHTML 1.0 document. Also, the syntax coloring in
the "source code" pane is wrong.

Reproducible: Always

Steps to Reproduce:
1. Start Mozilla (I tested with 1.5 and the 2003-Nov-14 nightly build).
2. In a new browser window open example.html.
3. Click on the two links to verify that the functions actually work.
3a. Optionally run the W3C validator to see that this is valid XHTML.
4. Select from the menu bar Tools->Web Development->JavaScript Debugger
5. Expand the example.html item in the list in the Loaded Scripts pane.
Note that both FunctionOne and FunctionTwo are listed.
5. Right-click on FunctionOne and select Find Function.
Note that from line 17 on, the syntax coloring is incorrect.
6. Switch back to the browser window that contains example.html and reload it.
7. Switch to the JavaScript Debugger window again.
8. Re-expand the example.html item in the Loaded Scripts pane.
Note that FunctionOne is missing now, replaced by __toplevel__.
9. Right-click FunctionTwo and select "Find Function"
Note that the syntax coloring is still wrong.

Actual Results:  
FunctionOne disappeared from the list in the Loaded Scripts pane, and the syntax
coloring was consistently wrong.

Expected Results:  
FunctionOne should always be listed, and the syntax coloring should ignore the
unbalanced single quote that is inside an HTML comment on line 17.
(Reporter)

Comment 1

14 years ago
Created attachment 135500 [details]
This is the file that exercises the bug.
Product: Core → Other Applications

Comment 2

12 years ago
As per bug 236086, I get two Loaded Scripts items, one contains:
  __toplevel__       6
  FunctionOne        8
The other:
  __toplevel__      19
  FunctionTwo       21

You need to turn off EXclude Duplicates from the Loaded Scripts context menu to get both to appear, otherwise the second one replaces the first. See the other bug for more details.

The syntax colouring is indeed wrong. This is the only issue I believe actually exists here, so I'm changing the summary a bit.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Parser problems - function list and syntax coloring get confused by quotes in valid XHTML doc → Syntax highlighter/coloring get confused by quotes in X/HTML comment

Updated

12 years ago
OS: Mac OS X 10.2 → All
Hardware: Macintosh → All

Updated

10 years ago
QA Contact: caillon → venkman
You need to log in before you can comment on or make changes to this bug.