我有以下html代码:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css"
integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
每当我通过按下shift+Alt+f", it just wraps the
完整性attribute to the next line. I would like to keep everything on one line. I did some research, and found out the setting that control it is
html.format.wrapAttributes`使用VS代码的自动格式化程序时,但根据文档,仅有四个设置是:
auto: Wrap when the line length is exceeded
force: Wrap all attributes, except first
force-aligned: Wrap all attributes, except first, and align attributes
force-expand-multiline: Wrap all attributes
没有设置将其关闭。我试图将其设置为"html.format.wrapAttributes": false
和"html.format.wrapAttributes": ""
。他们没有帮助。
我想知道如何设置VS代码,以便每次使用VS代码HTML自动格式化程序时,都不再将integrity
属性包装到另一行吗?