Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 463519

Summary: [HTML] Parser cannot recognize tags when html starts with "<!doctype html>"
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: ClientAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie
Version: 8.0   
Target Milestone: 9.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 441623    
Bug Blocks:    

Description Curtis Windatt CLA 2015-03-30 16:55:38 EDT
Hovers don't work in a file that starts with !doctype.  I'm surprised this isn't fixed by Bug 441623.

<!doctype html>
<head>
  <meta charset="utf-8">
  <link rel=stylesheet href="doc/docs.css">
  <title>Tern</title>
</head>

<div id=top>
  <div id=head>
    <a href="http://ternjs.net" class=title>Tern: <span class=subtitle>Intelligent JavaScript tooling</span>
    </a><a href="doc/demo.html">Demo
    </a><a href="doc/manual.html">Docs
    </a><a href="https://github.com/marijnh/tern">Code</a>
  </div>
</div>
Comment 1 Curtis Windatt CLA 2015-03-30 17:13:06 EDT
Seems to work for all caps "!DOCTYPE html".
Comment 2 Curtis Windatt CLA 2015-04-01 15:16:56 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7ee5da4c0834745449a0cf5b5dfa9b10d5575422
Fixed in master, the parser does an equals check against DOCTYPE rather than a case-insensitive compare.
Comment 3 Michael Rennie CLA 2015-04-06 14:19:59 EDT
I created some unit tests for the HTML parser to make sure this stays fixed as we move to new versions of the parser (if we ever do...)

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=5ad057f2b05738838492e3da0ce06d47948e4780

All tests pass