Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML整洁,Don';不要动那些评论!_Html_Comments_Htmltidy - Fatal编程技术网

HTML整洁,Don';不要动那些评论!

HTML整洁,Don';不要动那些评论!,html,comments,htmltidy,Html,Comments,Htmltidy,我正在使用HTMLTidy,我的一些注释从文档的开头移到了文档的根。有没有办法避免这种行为 (我正试图将一些非常糟糕的标记转换成xhtml投诉代码)哦,另外,它使用了一种内部开发的半服务器端脚本语言,使用注释将数据放置在html中,非常非常不标准。。。我很想彻底改变…但你知道雇主是如何 问题是: 整理前: <head> ... <!-- BODY_ON_LOAD_SECTION --> <script type=

我正在使用HTMLTidy,我的一些注释从文档的开头移到了文档的根。有没有办法避免这种行为

(我正试图将一些非常糟糕的标记转换成xhtml投诉代码)哦,另外,它使用了一种内部开发的半服务器端脚本语言,使用注释将数据放置在html中,非常非常不标准。。。我很想彻底改变…但你知道雇主是如何

问题是:

整理前:

    <head>
    ...
        <!-- BODY_ON_LOAD_SECTION -->
           <script type="text/javascript" language="Javascript">
                function init() {
                openWin('BODY_ON_LOAD_SECTION_REFERENCE','','resizable=yes,width=400,height=400,left=50,top=50');
            }
           </script>
        <!-- END_BODY_ON_LOAD_SECTION -->
    </head>

...
函数init(){
openWin(“主体在加载时,截面在参考中”,“可调整大小=是,宽度=400,高度=400,左侧=50,顶部=50”);
}
整理后:

        <script type="text/javascript" language="Javascript"> 
        function init() {   
            openWin('BODY_ON_LOAD_SECTION_REFERENCE','','resizable=yes,width=400,height=400,left=50,top=50'); 
} 
    </script> 
</head><!-- BODY_ON_LOAD_SECTION --> <!-- END_BODY_ON_LOAD_SECTION --> 

函数init(){
openWin(“主体在加载时,截面在参考中”,“可调整大小=是,宽度=400,高度=400,左侧=50,顶部=50”);
} 

它们是评论。你真的需要整洁的版本吗


我在《tidy》中看到的唯一两个与评论相关的方法是隐藏它们和修复不好的评论,这样你可能会倒霉。

在这种情况下,是否有其他方法缩进代码?所有的代码都用表格进行布局,就像那个穿着裤子的方向盘海盗说的那样,“我快疯了!”