【发布时间】:2020-05-14 03:25:33
【问题描述】:
我有一个在 Visual Studio 2019 中编辑的 ASP.Net Core 网页。它实际上是 _layout.cshtml 页面。 在其他应用程序中编辑后,我将 SVG 代码内联粘贴到 html 中。
当我将 SVG 代码粘贴到我的 span 控件中时,它看起来像这样...
<span>
<svg svg details here...>
<path d="coordinates here..."/>
<path d="coordinates here..."/>
<path d="coordinates here..."/>
</svg>
</span>
但是,当我单击 Visual Studio 工具栏上的“格式化整个文档”按钮(或按 CTRL - E、D)时,每次都会在我的 SVG 代码中获得新行(仅在 SVG 代码中 - 不是我的文档的其余部分)。
这意味着如果我按一次,我会得到
<span>
<svg svg details here...>
<path d="coordinates here..."/>
<path d="coordinates here..."/>
<path d="coordinates here..."/>
</svg>
</span>
如果我再按一下,我就会得到这个......
<span>
<svg svg details here...>
<path d="coordinates here..."/>
<path d="coordinates here..."/>
<path d="coordinates here..."/>
</svg>
</span>
在添加一个包含大约 100 行的 SVG 并尝试多次格式化我的文档后,我的页面看起来相当稀疏!
有谁知道为什么会发生这种情况,以及如何阻止它?
【问题讨论】:
-
可能是您应该向 Microsoft 报告的错误。
标签: visual-studio svg code-formatting