-
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
Add indent_size ("tab_stops") option for HTML ERB beautifier #264
Comments
HTML ERB is beautified using At best, Atom Beautify could add support for the "tab stops" option (indentation size in spaces), however there are no options available for preserving line breaks with ERB. @prettydiff, do you support HTML ERB? It'd be great to switch off of htmlbeautifer and stick with more Prettydiff? Let me know what you think 😃 Thanks! |
I currently support the ERB pretty closely, because the syntax is ASP style delimiters. Here is some detail about the syntax: http://stackoverflow.com/questions/7996695/what-is-the-difference-between-and-in-erb-in-rails Currently, I am not indenting the logic of an ERB file, because it is largely grammar based. Consider the following ERB example:
Beautifies to:
I would have to watch for the Angular template example:
Beautifies to:
In this case I can look to the opening and closing curly braces at the end and start of the template tags to know that there should be some extra indentation. |
Also, I do not preserve empty lines in markup files, but I could add this in. |
In the next release (v0.25.0), ERB language will have support for both
@prettydiff how goes support for ERB? |
Support is the same. |
Publish to v0.28.3
|
Hi, so does the feature to indent any ruby erb tag like for or if have been added? |
@benjaminb10 Could you provide a code example so that I can ensure I understand your question more precisely? |
@prettydiff
Should be auto indented like that:
|
For rails erb files , The settings I entered for html doesn't work for erb files , for example preserving line breaks is not applied in erb files
The text was updated successfully, but these errors were encountered: