Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Code coloring broken for html file with Embedded JavaScript templates (EJS) #4137

Closed
dalcala opened this issue Jun 6, 2013 · 5 comments
Closed

Comments

@dalcala
Copy link

dalcala commented Jun 6, 2013

Description:
Code coloring broken for html file with Embedded JavaScript templates (EJS). I got this file from the Adobe CSS FilterLab repo: https://github.com/adobe/cssfilterlab/blob/master/index.html

Repro using Brackets Sprint 25 on Win 7 and Mac 10.7.

Repro steps:

  1. Get this file and open it in Brackets: https://github.com/adobe/cssfilterlab/blob/master/index.html

Actual results:
The code coloring is broken, starting with this tag: <%- css %>.

brackets-ejs-bug

Expected results:
Code coloring is not broken. Works fine in Sublime Text 2.

Workaround:
None.

@jasonsanjose
Copy link
Member

Looks like this works in the code mirror demo http://codemirror.net/mode/htmlembedded/. However, we would either need to

A. Swap htmlmixed for htmlembedded or
B. Require EJS files to have a .ejs extension.

I think B is safe for now and we might reconsider A in the future. Eventually users will have the option to override the mode via https://trello.com/c/FaoluhZ5.

Reviewed, low priority to @jasonsanjose.

@ghost ghost assigned jasonsanjose Jun 7, 2013
@lkcampbell
Copy link
Contributor

I submitted pull request #4166 that implements solution B.

njx added a commit that referenced this issue Jun 12, 2013
@lkcampbell
Copy link
Contributor

This should be fixed now. At the very least, this bug should be marked FBNC.

@lkcampbell
Copy link
Contributor

@dalcala or @jasonsanjose, when you get a moment, please confirm this fix and close this bug.

@peterflynn
Copy link
Member

It doesn't fix the original bug as filed -- .html files will still get treated as regular HTML -- but that's just a FOL until changing the syntax mode per-file or per-extension is implemented. It's definitely fixed for the .ejs extension, I think we're good to close.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants