-
Notifications
You must be signed in to change notification settings - Fork 6
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
Eex expressions converted to eextN #59
Comments
@adamzapasnik any thoughts on what a fix might look like here? Here's a minimal testcase: Before:
After:
Apart from this issue, I'm really loving this plugin. Thank you! |
hey guys, apologies for my absence. These are bugs not related to prettier, I'll fix them along with a migration to 2.3 prettier. This can take a while, though. So for now, you'll have to ignore these files 😓 |
This same issue happens to me on a fresh install of prettier 2.2.1 and prettier-plugin-eex 0.4 with no prettierrc |
May be related but I'm having this happen to files only when I add ` at the top of the file. Before format: <!-- prettier-ignore -->
<div class="flex-1">
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<%= @inner_content %>
</div> After format: <!-- prettier-ignore -->
<div class="flex-1">
<p class="alert alert-info" role="alert"> <eext1 /> </p>
<p class="alert alert-danger" role="alert"> <eext2 /> </p>
<eext3 />
</div> Without the prettier ignore comment it works correctly. |
Deired Behaviour
format not only HTML but also
eex/leex
expression without buggy convertionsActualBehaviour
All eex/leex expressions are converted to eextN where N is the "index" of expression. So you if you have 3 expression into a template, they will be converted to:
eext1
eext2
eext3
Versions
elixir:
v1.12.1
erlang/OTP:
v24.0.0
node:
v12.22.1
yarn:
v1.221
prettier:
v2.2.1
prettier-plugin-eex:
v0.5.0
Screenshots
The text was updated successfully, but these errors were encountered: