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

Issues with leading dash in embedded ruby block #42

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

Issues with leading dash in embedded ruby block #42

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 happens when running prettier on my legacy erb file:

-<%-
-  page = Refinery::PageDecorator.new(@page, self)
+<%
+  -page = Refinery::PageDecorator.new(@page, self)

<%- etc -%> with leading and/or trailing dash inside the block is valid Ruby, <% -etc- %> obviously isn't.

Granted, this syntax has been deprecated since Rails 4.2, so I should probably refactor my templates. In old Rails it was supposed to remove leading and/or trailing spaces in the output, but since 4.2 this behaviour changed and they're now unneeded.

Background:

But old syntax or not, this is probably still a bug?

@adamzapasnik
Copy link
Owner

hey again @evenreven that's also a bug, and thanks for reporting this one too 👍

@adamzapasnik adamzapasnik added the bug Something isn't working label May 17, 2021
@adamzapasnik adamzapasnik self-assigned this 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