beautifier/js-beautify

HTML option "wrap-attributes": "preserve" does not preserve line break before closing angle bracket

Open

#1.707 geöffnet am 10. Sept. 2019

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (8.342 Stars) (1.460 Forks)batch import
good first issuelanguage: htmltype: bug

Beschreibung

If you use "wrap-attributes": "force-expand-multiline", you get:

<tag
    attr1="val1"
    attr2="val2"
>content</tag>

The line break before the closing angle bracket is forced with this option.

Now, when you set "wrap-attributes": "preserve", I would expect this formatting to be preserved. However, you get:

<tag
    attr1="val1"
    attr2="val2">content</tag>

Please fix "preserved" or add a new option for keeping the line break before the closing angle bracket.

Contributor Guide