2016-03-01 58 views
1

这个问题是关于:使用Tidy2记事本++有人可以帮我配置Tidy2记事本++

我的家伙HTML清理!我试着在这里查找HTML的Tidy配置,似乎人们正在用它来整理不同程序语言的代码,所以我无法回答自己的问题。

嗯,我一般编辑网页的部分,而且大部分看起来绝对可怕的时间,所以我用整齐把它清理干净了我。由于我编辑部分,因此我无法使用基本HTML设置(<html><head><title></head><body></body></html>)。我已经读过,使用show-body-only属性可以解决这个问题,但实际上并没有任何方向。我尝试在配置文件的末尾放置show-body-only:true,但它仍然打印出通常所有额外的垃圾。

如何在记事本++实现这一点?在文件末尾放置属性的位置是否重要?我是否正确地做了这件事,而这只是不工作?

任何帮助将不胜感激!

这里是我的配置文件:

 indent: auto 
    indent-spaces: 4 
    wrap: 132 
    markup: yes 
    output-xml: yes 
    input-xml: no 
    numeric-entities: yes 
    quote-marks: yes 
    quote-nbsp: yes 
    quote-ampersand: no 
    break-before-br: no 
    uppercase-tags: no 
    uppercase-attributes: no 
    new-inline-tags: cfif, cfelse, math, mroot, 
     mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover, 
     munder, mover, mmultiscripts, msup, msub, mtext, 
     mprescripts, mtable, mtr, mtd, mth 
    new-blocklevel-tags: cfoutput, cfquery 
    new-empty-tags: cfelse 
    show-body-only: true 

回答

1

只是想,我会更新这个,说我找到了答案后,太多乱搞。 事实证明,“output-xml:yes”干扰了“仅限show-body-only:yes”属性。

我希望这可以帮助别人,所以这里是代码,还删除的空标签和所有的好东西,但它不会打印出任何额外的HTML垃圾!

indent: yes 
indent-spaces: 4 
wrap: 132 
markup: yes 
clean: yes 
show-body-only:yes 
vertical-space: no 
sort-attributes: alpha 
add-xml-space: no 
output-xml: no 
input-xml: no 
numeric-entities: yes 
quote-marks: yes 
quote-nbsp: yes 
quote-ampersand: no 
break-before-br: no 
uppercase-tags: no 
uppercase-attributes: no 
new-inline-tags: cfif, cfelse, math, mroot, 
    mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover, 
    munder, mover, mmultiscripts, msup, msub, mtext, 
    mprescripts, mtable, mtr, mtd, mth 
new-blocklevel-tags: cfoutput, cfquery 
new-empty-tags: cfelse