2016-03-01 38 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