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 合并指标
 (平均合并 51天 1小时) (30 天内合并 16 个 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.

贡献者指南