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

Formatter deletes content when using quote literals #67

Open
Manfred opened this issue Nov 18, 2024 · 0 comments
Open

Formatter deletes content when using quote literals #67

Manfred opened this issue Nov 18, 2024 · 0 comments

Comments

@Manfred
Copy link

Manfred commented Nov 18, 2024

When using a combination of a conditional and pairs of literal quotes (ie. both “” and ‘’), erb-formatter will delete part of the content:

<% if named? %>
  The folder “<%= name %>” will be deleted.
<% end %>

Becomes:

<% if named? %>
  The folder “<%= name %>will be deleted.
<% end %>

And it gets worse when you also include a elsif clause, so it looks like an indexing problem when attempting to move the <%= name %> expression to a separate line.

The workaround is to use character entities:

<% if named? %>
  The folder &#8220;<%= name %>&#8221; will be deleted.
<% end %>
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