简体   繁体   English

Visual Studio 2010源格式化HTML div标记

[英]Visual Studio 2010 source formatting HTML div tag

I've got my div tags set to insert line breaks "Before opening, within, and after closing" but I'm not getting the line break after the content. 我已经将我的div标签设置为插入换行符“在打开之前,之内和之后”,但我没有在内容之后获得换行符。

I'm getting this: 我明白了:

<div>
   content</div>

But I want this: 但我想要这个:

<div>
   content
</div>

Again, I have the correct selection made in the options. 同样,我在选项中做出了正确的选择。 It even shows the correct way in the preview box. 它甚至在预览框中显示正确的方式。 If I change the selection to no line breaks, it formats correctly. 如果我将选择更改为无换行符,则表示格式正确。

Is this an issue for anyone else? 这对其他人来说是个问题吗?

Note, this is in aspx/c pages. 注意,这是在aspx / c页面中。

The reason it doesn't separate the closing div element is because adding a space there would potentially change the whitespace semantics of the rendering. 它没有将结束div元素分开的原因是因为添加一个空格可能会改变渲染的空白语义。
Have a look at the last comment made by scott gutherie : http://weblogs.asp.net/scottgu/archive/2006/07/07/Tip_2F00_Trick_3A00_-Custom-formatting-HTML-in-Visual-Web-Developer-and-Visual-Studio-2005.aspx 看看scott gutherie最后的评论: http ://weblogs.asp.net/scottgu/archive/2006/07/07/Tip_2F00_Trick_3A00_-Custom-formatting-HTML-in-Visual-Web-Developer-and- 视觉工作室,2005.aspx

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

相关问题 Visual Studio 2010中的HTML格式 - HTML formatting in Visual Studio 2010 带有col,colgroup,tbody和thead的HTML表标记会在Visual Studio 2010和Visual Studio 2012中引发编译错误 - HTML table tag with col, colgroup, tbody, and thead throws compile error in Visual Studio 2010 and Visual Studio 2012 Visual Studio 2010自动格式化ASPX maladies - Visual Studio 2010 Auto-Formatting ASPX maladies HTML5与Microsoft Visual Studio 2010 - HTML5 with Microsoft Visual Studio 2010 使用Visual Studio 2010将.dmp文件调试到特定的源代码行 - Debugging .dmp file with Visual Studio 2010 to specific line of source Visual Studio 2010-无法通过菜单添加数据源 - Visual Studio 2010 - Can't add a data source through menu 在源代码管理下,将网站升级到Visual Studio 2010中的Web应用程序 - Upgrade website to webapplication in visual studio 2010 while under source control 未知服务器标签ASP.NET 2.0 Visual Studio 2010 - Unknown Server tag ASP.NET 2.0 Visual Studio 2010 无法识别的标记前缀或设备过滤器(Visual Studio 2010) - Unrecognized tag prefix or device filter (Visual Studio 2010) 如何在Visual Studio 2010中将值从HTML传递到ASPX文件 - How to pass value from HTML to a ASPX files in Visual Studio 2010
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM