Visual Studio 2008的HTML格式 - 它有没有工作? [英] Visual Studio 2008 HTML formatting - does it ever work?
问题描述
我通过以下方式删除所有客户端标记:
工具 - >选项 - 文本编辑器 - > HTML - >格式 - >标签特定选项
然后添加b和span标签: alt text http://www.xtupload.com/新/ thumb-3BB0_49B92330.jpg 我按下CTRL + E,CTRL + D,我得到这两个不同的结果: 替代文字http://www.xtupload.com/new/image-CBF1_49B92330.jpg 替代文字http://www.xtupload.com/new/image-3AB6_49B92330.jpg
1
跨度标记之前的P格式不正确
2
P标签格式正确。
$ b $对于一个.ASPX扩展名文件来说,它是一个。
错误,并不依赖于SPAN或B的标签。
解决方法是找到
$ p
$ b
如何失败
< p>< b>我的标题< / b>< / p>
获取格式为
< p为H.
< b>我的标题< / b>< / p>
如何使用
< p>< b>我的标题< / b> < / p为H. (注意B之后的空格)被重新格式化为: p>
< p>
< b>我的标题< / b>
< / p>
这个额外的空间被VS去掉了。哈利路亚我的HTML看起来很漂亮!
It's another Visual Studio 2008 HTML formatting question...I think I have either found a bug in the infamously bad VS HTML formatting, or I'm doing something wrong. Here's what I'm doing:
I remove all client side tags via:
Tools -> Options -> Text Editor -> HTML -> Format -> Tag Specific options
I then add b and span tags:
alt text http://www.xtupload.com/new/thumb-3BB0_49B92330.jpg
I press CTRL+E,CTRL+D and I get these two differing results:
1
alt text http://www.xtupload.com/new/image-CBF1_49B92330.jpg
The P before the span tag isn't formatted properly
2
alt text http://www.xtupload.com/new/image-3AB6_49B92330.jpg
The P tag is formatted correctly.
This for a .ASPX extension file.
解决方案 It looks like it is a bug, and isn't dependent on the tag being SPAN or B.
The work around I found
Add an extra space before the closing P.
How it fails
<p><b>My title</b></p>
Gets re-formatted as
<p>
<b>My title</b></p>
How to get it to work
<p><b>My title</b> </p>
(NB the space after the B) gets reformatted as:
<p>
<b>My title</b>
</p>
And that extra space is removed by VS anyway. Hallelujah my HTML looks beautiful!
这篇关于Visual Studio 2008的HTML格式 - 它有没有工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!