| Summary: | [codemirror] Assume all PHP files can contain HTML | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Client | Assignee: | Project Inbox <orion.client-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mike.milinkovich |
| Version: | 2.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Mark Macdonald
I have tried renaming a couple of my .php files to .phtml and Orion 1.0 does not provide any syntax highlighting of the HTML. It's only highlighting the PHP code. In other words, it seems like the CodeMirror plug-in is actually treating .phtml files exactly the same as .php files. [1] is the file I was trying. If you want to try repeating my attempt, it is contained in the [2]repo. [1] http://www.eclipse.org/org/foundation/directions_Portland.php [2] git.eclipse.org/gitroot/www.eclipse.org/org.git OK, I see the problem. The HTML code in question is inside a heredoc string: > <?php > $html = <<<EOHTML > <div id="midcolumn"> > <!-- lots of html --> > </div> > EOHTML; > > ?> The "EOHTML" delimiter is a convention indicating the heredoc contains HTML. Some editors recognize this and provide HTML highlighting, but CodeMirror currently does not. It only highlights HTML code outside of your <?php .. ?> tags (and, in the case of Orion, only within a .phtml file, as I mentioned earlier). If anyone wants to add support for EOHTML to CodeMirror's PHP parser [1], we can pick it up in the next plugin update. [1] https://github.com/marijnh/CodeMirror/blob/master/mode/php/php.js Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html |