我想有在同一行的每个HTML属性:ReSharper的代码格式不会对HTML文件的工作
<input
id="title"
type="text"
class="form-control"
data-bind="value: title, attr: { placeholder: language.getValue('measureName_placeholder') }"
/>
为了得到这一点,我在启动设置“在单独的行中的每个属性” ReSharper的。但是,如果我格式化文件,则不插入换行符。所有属性仍留在同一行:
<input id="title" type="text" class="form-control" data-bind="value: title, attr: { placeholder: language.getValue('measureName_placeholder') }" />
我用R·9.2与Visual Studio 2015年社区重现该问题:打开VisualStudio中,创建一个新的HTML文件,选择所有内容和格式的代码。 (用于选择的上下文菜单中的命令“格式选择”)。结果,然后我得到的是
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
</body>
</html>
我期望的属性郎和xmlns是在单独的线。
这是一个ReSharper错误还是我错过了一个额外的设置或以防止ReSharper实际插入换行符?
的代码格式化条目似乎正确地包括在设置文件:
<s:String x:Key="/Default/CodeStyle/CodeFormatting/HtmlFormatter/ProcessingInstructionAttributesFormat/@EntryValue">OnDifferentLines</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/HtmlFormatter/TagAttributesFormat/@EntryValue">OnDifferentLines</s:String>
作品中的R#9.2如预期。您使用哪个R#版本? – ulrichb
我在Visual Studio Community 2015中使用R#9.2。 – Stefan