Skip to content

[Bug]: 使用 prettyHtml 格式化wxml文件,空串属性格式化不符合预期 #167

@liwuhou

Description

@liwuhou

如何复现:

跟依赖的 prettyHtml 有关,这个 Prettyhtml/prettyhtml#53 改变了这个特性,但在小程序里不太合适。
有这么一个组件,接收 title 这个props 来显示标题

<Modal title="" content="{{x}}" />

格式化之后:

<Modal title content="{{x}}" />

这样值就变成了 booleantrue

...

期望的表现:

<Modal title="" content... />

<Modal title="{{''}}" content... />

实际的表现:

Untitled

插件运行环境

  • 插件版本: v2.4.12
  • VSCode版本: 1.80.0
  • 操作系统(非必须):

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions