-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading Syntax File Error … or No Error? #5
Comments
Hmm this is weird. I'm on 4143 right now and have no problems. Opening up EJS files with the syntax works as expected. Perhaps they added some sort of check when you install a new package. I'll have to look into it, but I'm not sure if it's possible to remove the recursion from the syntax. Since you're able to install it with Sublime 3, can you try upgrading from 3 to 4 with the package already installed? That might let you keep it installed and not get the error message. |
I've been reading Sublime's docs and it looks like they've added a lot of helpful features to their syntax definitions. I'm going to try rewriting it using the new features. |
Very quick answer, thank you very much. I try to upgrade ST3 to ST4, your plugin is very useful! |
I spent a lot of time troubleshooting and finally found the problem: I modified something in the official JavaScript package. My original intention of modifying the official JavaScript package was to allow ES6 template strings to support HTML syntax highlighting, which is a perfectly normal requirement. So wo made the following changes JavaScript.sublime_syntax file in the official JavaScript package, around line 1133
The bold content above is something I added but not officially available. It will allow ES6 template strings to have the ability to highlight HTML syntax, but it will cause syntax parsing errors in EJS2. So the final question is, how can I get syntax highlighting for ES6 template strings and be compatible with the syntax parsing of EJS2 packages? |
If that's the case, then it may be impossible. HTML can already contain JavaScript, so then if you update it so that JavaScript can contain HTML, that's an infinite loop. I just updated this package to use a different Sublime Syntax feature to implement EJS. Maybe that will help. If not, you'd probably have to figure something out with the people who created Sublime Text's Syntax Definitions to come up with a solution, since I don't know enough about Sublime's own HTML and JavaScript definitions to figure out a solution on my own. |
When I installed the EJS2 package, an error occurred as below. How can I solve it?
My environment:
SublimeText win-x64 4143 build (latest fourth edition)
EJS 2 package version: 1.4.7 (the latest version)
Then, strangely enough, when I installed the same package in sublimetext 3, everything worked fine. what is going on?
My environment:
SublimeText win-x64 3211 build (latest third version)
EJS 2 package version: 1.4.7 (the latest version)
Conclusion: ST3 and ST4 are not fully compatible, and the same version of the plug-in package will have problems
The text was updated successfully, but these errors were encountered: