beautifier/js-beautify

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

オープン

#1,707 opened on 2019/09/10

 (8 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (1,460 件のフォーク)batch import
good first issuelanguage: htmltype: bug

Repository metrics

Stars
 (8,342 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド