| Summary: | [HTML][Outline] HTML outline selects wrong ranges when !DOCTYPE is used | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> | ||||
| Component: | Client | Assignee: | Curtis Windatt <curtis.windatt.public> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | curtis.windatt.public | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 7.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 463519 | ||||||
| Attachments: |
|
||||||
The outline works for a lot of HTML pages even if multiple tags are moved onto one line, but adding !DOCTYPE messes up everything on that line. <!DOCTYPE html><head><script >var foo;foo = 2;</script></head> <body> Hi </body> </html> This is a bug in the Tautologistics HTML parser library. If a node is skipped (not written out to the tree) such as !DOCTYPE, the code fails to call _updateLocation() which increases the line/col based on the found node. The doctype node support: https://github.com/tautologistics/node-htmlparser/pull/48 The fix fails to update the location correctly. Fixed in master http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=f05495cf1a7c54917f2cd3eafdd612786a9999a7 Note that the snippet given here is incorrect html. The DOCTYPE DTD directive is not a tag, so it must be followed by the opening <html> tag <!DOCTYPE html> <html> <head><script >var foo;foo = 2;</script></head> <body> Hi </body> </html> |
Created attachment 245926 [details] screen shot The HTML outline selects the wrong ranges when you select an item in the outline. See attached screen shot