nebulab / erb-formatter

Format ERB files with speed and precision
MIT License
135 stars 22 forks source link

Put unquoted and name only attributes on the same line when possible #59

Open enescakir opened 1 month ago

enescakir commented 1 month ago

Currently, unquoted and name-only attributes are placed on a new line, even when they could fit on the same line. This PR modifies this behavior to keep them on the same line when possible.

Expected output:

<input type="hidden" name="my-name" value="my-value" hidden/>

Current output:

<input type="hidden" name="my-name" value="my-value"
  hidden/>
enescakir commented 1 month ago

Hi @elia, do you have any reviews for this PR?