On Update build 3013 my ejs file suddenly change and the highlight are not as they where before ?
how to fix this ?
On Update build 3013 my ejs file suddenly change and the highlight are not as they where before ?
how to fix this ?
When the status bar is showing and you open the file what text appears at the far right edge of the status bar?
I have a similar case. The syntax detection is correct, but the highlight is not.
Here’s a bit more detailed example using the latest Sublime Text dev build (3107)
I’ve forked the EJS package that’s in PackageControl and I’ve added a .sublime-syntax file to it.
I need to write some tests and add some EJS specific key words for highlighting. But, this gets you proper HTML and almost proper JS highlighting, just no specific EJS keywords such as “include” highlighting.
The main issue I’ve noticed (aside from needing EJS specific keywords) is that on line 11 those braces are scoped as illegal due to popping in and out of the JS scope the starting braces aren’t matched up with them.
Not sure how to go about fixing that since I’m really just including the HTML and JS syntax files from core to do the scoping.
Maybe @wbond has some insight?
I’m thinking I may have to just add little “patch” matches to override the scoping applied… but hoping there’s something a bit more clever that can be done.
In the EJS syntax add match clauses for )
and }
. Then include JavaScript after them. This should be sufficient since they should only ever occur in the top-most context due to the fact that there won’t be any code that will have taken the lexer into one of the nested contexts.
Thanks for input! but… not sure I quite follow on that. As it stands, they’re getting scoped in JS but as:
<% }) %>
^ text.html.ejs source.js.embedded.ejs
^ text.html.ejs source.js.embedded.ejs invalid.illegal.stray.brace.round.js
and any other matching i try to do with those, breaks the HTML highlighting
I added a comment at https://github.com/subhaze/EJS.tmLanguage/commit/e3bb21f08ae4a7453da6b6e950bd6111199f1cdd#commitcomment-16486307