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

Incorrect treatment of <%== %> in html.erb files #110

Open
beniutek opened this issue May 24, 2022 · 0 comments
Open

Incorrect treatment of <%== %> in html.erb files #110

beniutek opened this issue May 24, 2022 · 0 comments

Comments

@beniutek
Copy link

Hello

It looks like (using version 0.4.0) prettier plugin erb is not handling correctly things like

<%== 'something' %>

when running prettier it will signal files containing that code and when --write option is passed it will attempt to rewrite it to

<%= = 'something' %>

<%== is a valid html.erb thing (check https://edgeguides.rubyonrails.org/active_support_core_extensions.html#safe-strings )
and it simply is an equivalent of raw method.

The workaround is to use

<%= raw('something') %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant