beautifier/js-beautify

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

開放

#1,707 建立於 2019年9月10日

 (8 則留言) (0 個反應) (0 位負責人)JavaScript (1,460 個分叉)batch import
good first issuelanguage: htmltype: bug

倉庫指標

星標
 (8,342 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南