有人可以帮我配置Tidy2 for Notepad ++

时间:2016-03-01 01:12:45

标签: html notepad++ code-cleanup tidy

这个问题是关于:使用Tidy2 for Notepad ++进行HTML清理

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

好吧,我通常会编辑网页的各个部分,而且大多数时候它看起来非常糟糕,所以我用整洁来为我清理它。因为我编辑了部分,所以我没有使用基本HTML设置(<html><head><title></head><body></body></html>)。我已经读过,使用show-body-only属性可以解决这个问题,但实际上并没有任何方向可以实现它。我尝试在配置文件的末尾放置show-body-only:true,但它仍然打印出它通常所做的所有额外垃圾。

如何在Notepad ++中实现它?将属性放在文件末尾的位置是否重要?我这样做是否正确,它是不起作用的?

任何帮助将不胜感激!

这是我的配置文件:

    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 个答案:

答案 0 :(得分:1)

只是认为我更新了这个并且说我在太多搞乱之后找到了答案。 结果是&#34; output-xml:yes&#34;正在干扰&#34; show-body-only:是&#34;属性。

我希望这可以帮助其他人,所以这里是代码,仍然删除空标签和所有好东西,但它不会打印出任何额外的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