brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Code coloring broken for html file with Embedded JavaScript templates (EJS) #3851

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by dalcala Thursday Jun 06, 2013 at 23:29 GMT Originally opened as https://github.com/adobe/brackets/issues/4137


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.

core-ai-bot commented 3 years ago

Comment by jasonsanjose Friday Jun 07, 2013 at 21:33 GMT


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.

core-ai-bot commented 3 years ago

Comment by lkcampbell Sunday Jun 09, 2013 at 04:41 GMT


I submitted pull request #4166 that implements solution B.

core-ai-bot commented 3 years ago

Comment by lkcampbell Thursday Jul 25, 2013 at 03:40 GMT


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

core-ai-bot commented 3 years ago

Comment by lkcampbell Friday Aug 02, 2013 at 22:43 GMT


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

core-ai-bot commented 3 years ago

Comment by peterflynn Saturday Aug 03, 2013 at 02:09 GMT


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.