问题描述
我遍历了Vscode的Prettier扩展,但找不到如何禁用此方案.参见html标签的>.
I walk through the Prettier extension of Vscode and I can't find how to disable this scenario. See the > of html tag.
这是我每次运行Prettier时需要修复的示例代码.输出是这样的:
Here's a sample code that needed some fix, every time i run the Prettier. The output is this:
<tag-html
[val1]="valueStr"
[val2]="valueStr"
>
</tag-html>
我想让漂亮的人输出:
<tag-html
[val1]="valueStr"
[val2]="valueStr">
</tag-html>
推荐答案
这可以在VS Code本身的帮助下完成.将以下条目放置在vs代码中的工作空间设置中.
This can be done with help of VS Code itself. Place the following entry in your workspace settings in your vs code.
"html.format.wrapAttributes": "force-aligned"
您不需要任何外部插件或扩展程序即可.
You don't need any external plugins or extension to do this.
或者您也可以使用GUI设置页面
Or you can use the GUI settings page as well
UPDATE 01
基于更漂亮的仓库中的github问题 https://github.com/prettier/prettier-vscode/issues/646
Based on github issue in prettier repohttps://github.com/prettier/prettier-vscode/issues/646
您仍然可以合并我上面提到的设置.
you can still merge the settings I have mentioned above.
这篇关于如何禁用更漂亮的设置,以创建>的新行html标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!