简体   繁体   English

如何在 Prettier 的一行中允许多个 HTML 元素

[英]How to allow multiple HTML elements on a single line with Prettier

I have the following HTML:我有以下 HTML: 在此处输入图像描述

can I prevent Prettier from changing it to this?我可以阻止 Prettier 将其更改为这个吗? 在此处输入图像描述

You can change this settings from the Prettier config.您可以从 Prettier 配置中更改此设置。

Go to File > Preferencecs > Settings > Extentions > Prettier Go 到文件 > 首选项 > 设置 > 扩展 > 更漂亮

Scroll down till you see "Fit code within the limit"向下滚动直到看到“Fit code within the limit”

Change the limit to 124 (This is what I use) or which ever you wish.将限制更改为 124(这是我使用的)或您希望的任何值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM