Skip to content

Formatter deletes content when using quote literals #67

@Manfred

Description

@Manfred

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 %>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions