threedaymonk / htmlbeautifier

A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.
MIT License
325 stars 59 forks source link

Formatting incorrect when setting attributes #66

Open j-manu opened 2 years ago

j-manu commented 2 years ago
<option <%= link[:selected] ? 'selected' : '' %>>
          <%= link[:name] %>
        </option>

This code does not get formatted correctly.

akimthedream commented 2 years ago

Same error also happens for me! Line 5 is indented which should not be the case!

Screenshot 2022-05-06 at 12 11 05

When removing <%= "selected" if condition %> from line 2 everything works perfect.