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

Long inline missing <% end %> #15

Open
lamp-town-guy opened this issue Feb 9, 2021 · 3 comments
Open

Long inline missing <% end %> #15

lamp-town-guy opened this issue Feb 9, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@lamp-town-guy
Copy link

A very weird stuff happened when I tried to format one very long line of code. I tested it and it works as a part of a file as well as the line by itself in a single file.

<span class="text-gray-900 font-medium hover:text-gray-600 transition ease-in-out duration-150"><%= item.name %> <%= if item.is_billable do %> <i class="fas fa-dollar-sign"></i> <% end %></span>

This is the result with missing <% end %>.

<span class="text-gray-900 font-medium hover:text-gray-600 transition ease-in-out duration-150"><%= item.name %>
    <%= if item.is_billable do %>
        <i class="fas fa-dollar-sign"></i> </eext2
></span>
@adamzapasnik adamzapasnik added the bug Something isn't working label Feb 9, 2021
@adamzapasnik adamzapasnik self-assigned this Feb 9, 2021
@adamzapasnik
Copy link
Owner

Hey @lamp-town-guy thanks for submitting the issue. Seems you even created an account specially to do this? Big thanks.
Currently, I offer you to add the file to .prettierignore. Or you can format it manually and it should stay that way.

I will try to release a fix until the end of this week (more or less I have something working already, but I need to test it thoroughly)

If you find another issue, please report it :)

@lamp-town-guy
Copy link
Author

It works when i format it manually without problems. So I don't have to put it into ignore file.

@lamp-town-guy
Copy link
Author

<%= @inner_content %> was formatted to <eext1 />. It seams to be the same type of bug so I don't want to open another issue for this one. This file contained only <%= @inner_content %> and nothing else. Other instances of this tag were OK. Only if it was by itself it was formatted the wrong way.

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