[英]Prevent VSCode from wrapping html tag content
"html.format.wrapAttributes": "force-aligned"
worked perfectly, it touched tag attributes and was doing nothing to tag content (I'm writing in Angular so its perfect for me) until today. "html.format.wrapAttributes": "force-aligned"
工作得很好,它触及标签属性并且对标签内容没有做任何事情(我在 Angular 中写,所以它对我来说很完美)直到今天。 Content started to wrap in places I don't want it to wrap in, I just want it to be preserved as it is.内容开始包裹在我不想包裹的地方,我只是希望它保持原样。 Everywhere.
到处。
"html.format.wrapLineLength": 0
isn't helping, as so html.format.contentUnformatted
doesn't (when I start to add some tags there - everything breaks). "html.format.wrapLineLength": 0
没有帮助,因此html.format.contentUnformatted
没有帮助(当我开始在那里添加一些标签时 - 一切都中断了)。 I need a solution for this.我需要一个解决方案。
EDIT: For clearance I'm using "editor.defaultFormatter": "vscode.html-language-features"
编辑:为了清除我正在使用
"editor.defaultFormatter": "vscode.html-language-features"
EDIT: Another things that makes me lose my mind.编辑:另一件事让我失去理智。 Ternary operators are formatted from:
三元运算符的格式来自:
<span>
{{
isTrue
? 'Yes'
: 'No'
}}
</span>
To至
<span>
{{
isTrue
? 'Yes'
: 'No'
}}
</span>
And yes, that's how it really is in a html.是的,这就是 html 中的真实情况。
"html.format.templating": true,
solves this issue. "html.format.templating": true,
解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.