Skip to content
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

Why add whitespace between % and # in comments? #43

Open
evenreven opened this issue May 17, 2021 · 2 comments
Open

Why add whitespace between % and # in comments? #43

evenreven opened this issue May 17, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@evenreven
Copy link

evenreven commented May 17, 2021

This plugin adds whitespace between <% and # in comments, like this <% # Comment %>. In the old days, whitespace before the # was not only actively discouraged, but would potentially screw up HTML rendering. The most correct syntax was <%# Comment %>. This is also the syntax examples in the official Rails API to this day. I hadn't even seen the whitespace variant until today.

More subjective data point: I find the whitespace makes the file harder to parse with my eyes. I'm used to looking for the character following the %. Whitespace means ruby block, = means output/render, and # means comment. Having whitespace in comments too makes it harder to scan.

Is there a different reason for this standard I don't know about?

@adamzapasnik
Copy link
Owner

hey @evenreven that's a bug, thanks for reporting it.

@adamzapasnik adamzapasnik self-assigned this May 17, 2021
@adamzapasnik adamzapasnik added the bug Something isn't working label May 17, 2021
@adamzapasnik
Copy link
Owner

should be fixed in a newly released v0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants