-
Notifications
You must be signed in to change notification settings - Fork 453
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
EJS Beautification support #136
Comments
@Glavin001 thanks for jumping into this. If you need any help let me know. Just direct me to the correct folder location where this should be integrated to. I might end up scribbling something. |
If we have a Node.js beautifier for EJS then it could be integrated into https://github.com/Glavin001/atom-beautify/blob/master/lib/language-options.coffee#L153 If not, and there is a CLI tool that could beautify it you'd need to extend https://github.com/Glavin001/atom-beautify/blob/master/lib/langs/cli-beautify.coffee and implement it similar to many other CLI beautifiers found in https://github.com/Glavin001/atom-beautify/tree/master/lib/langs such as https://github.com/Glavin001/atom-beautify/blob/master/lib/langs/python-beautify.coffee or https://github.com/Glavin001/atom-beautify/blob/master/lib/langs/perl-beautify.coffee et cetera. I hope this helps! I am in the middle of a big sprint at work and right after I have final exams, so I will be likely tied up for next two weeks. I'll try and help any way I can if you're up for the challenge of implementing this feature yourself 😃 |
I'm happy to oblige, I got a lot of reading ahead and I'm a bit tied up as well but I'll surely make my way to it. |
@prettydiff is this on your roadmap? |
Yes, assign this issue to me. I believe EJS is: I was looking at something similar this morning, but with different delimiters: {@ and @} instead of <% and %>, but all the logic appears the same. The delimiters not a concern (even the angle braces). The big challenge I am thinking through is:
It is challenging because that is a closing and opening of a block consolidated to a single markup token. HTML/XML does not have such a concept, because markup tokens either close or open blocks or neither. I will think through this. The worst case scenario if I cannot find an answer is that children of such blocks do not receive an additional level of indentation. |
I think everything between |
@prettydiff has added support so this is now high priority. |
@karloluis can you please provide an example file that I can use for my tests. Once I have passing tests I will be publishing. Thank you. |
Will be supported, thanks to @prettydiff, when #282 is released. |
What's new: - Beautifier options definition supports: - boolean - enable/disable - string - rename and enable - function - transform and enable - array - apply complex transformation to multiple options and output single option result - Show "Supported by <beautifiers>" for each language option - Beautifiers have a name - Beautifier options definition is used to determine if language option is supported by a beautifier - Remove SQL test, since sqlformat is inconsistant
Published to v0.25.0 This is a very big release with lots of internal changes and (hopefully) no breaking changes. Please let me know if you are experiencing any unusual behaviour / breaking changes after updating. Thank you. |
gives me a pinwheel dialogue that doesn't terminate... |
@adammeola01 Would you mind creating a new issue for that and following the template with the required information? That way we can triage and diagnose it properly. |
@prettydiff procedure to reproduce this:
it got me a endless pinwheel even when i run the command "Atom Beautify: Help Debug Editor" . https://gist.github.com/mywarr/7c051e94c3a573382a3f2254c1462dae |
It might be hard to deal with given that it will work as a html an html and js thing running over eachother but hey. It'd be awesome and you'd be one of the few if not the most complete out there yet.
The text was updated successfully, but these errors were encountered: