【问题标题】:HTML Tidy new empty line after closing tags关闭标签后的 HTML Tidy 新空行
【发布时间】:2012-10-11 15:31:32
【问题描述】:

当我使用Tidy HTML in Coda 时,它很干净,但我不喜欢空行

<ul>
    <li>…</li>
<!-- here -->
    <li>…</li>
</ul>

我尝试编辑配置但没有成功

// config file for Coda PHP Toolkit Tidy FORMAT script
// http://www.chipwreck.de/blog/software/coda-php
//
// documentation is here: http://tidy.sourceforge.net/#docs
// rev 5

anchor-as-name: no
doctype: auto
drop-empty-paras: no
fix-uri: no
literal-attributes: yes
merge-divs: no
merge-spans: no
numeric-entities: no
preserve-entities: yes
quote-ampersand: no
quote-marks: no
show-body-only: no
indent: auto
indent-spaces: 4
tab-size: 4
wrap: 0
wrap-asp: no
wrap-jste: no
wrap-php: no
wrap-sections: no
tidy-mark: no
new-blocklevel-tags: article,aside,command,canvas,dialog,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,meter 
new-inline-tags: video,audio,canvas,ruby,rt,rp,time,meter,progress,datalist,keygen,mark,output,source,wbr

// Change these only if you need to debug a problem with Tidy
force-output: yes
quiet: yes
show-warnings: yes

我看到了这个问题How do I get HTML Tidy to not put newline before closing tags?,但这对我没有帮助。

激活的选项是什么?

此配置没有空行但没有缩进:

// config file for Coda PHP Toolkit Tidy FORMAT script
// http://www.chipwreck.de/blog/software/coda-php
//
// documentation is here: http://tidy.sourceforge.net/#docs
// rev 5

anchor-as-name: no
doctype: auto
drop-empty-paras: no
fix-uri: no
literal-attributes: yes
merge-divs: no
merge-spans: no
numeric-entities: no
preserve-entities: yes
quote-ampersand: no
quote-marks: no
show-body-only: no
indent: no
indent-spaces: 2
tab-size: 2
wrap: 0
wrap-asp: no
wrap-jste: no
wrap-php: no
wrap-sections: no
tidy-mark: no
new-blocklevel-tags: article,aside,command,canvas,dialog,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,meter 
new-inline-tags: video,audio,canvas,ruby,rt,rp,time,meter,progress,datalist,keygen,mark,output,source,wbr

// Change these if you need to debug a problem with Tidy
force-output: yes
quiet: yes
show-warnings: yes  

【问题讨论】:

    标签: coda htmltidy


    【解决方案1】:

    经过多次试验,我找到了不添加空行的正确设置:

    indent: yes  // Indent for human readability. "yes" because "auto" adds blank lines.
    

    【讨论】:

      【解决方案2】:

      我建议添加

      vertical-space: no
      

      即使这应该是默认设置。

      这能解决问题吗?

      【讨论】:

        猜你喜欢
        • 2014-04-29
        • 2012-10-03
        • 2010-12-30
        • 2013-08-24
        • 1970-01-01
        • 2011-06-06
        • 2019-02-02
        • 1970-01-01
        • 2011-03-04
        相关资源
        最近更新 更多