本文介绍了关闭标签后的HTML Tidy新空行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我使用 Coda中的HTML整洁干净但是我不知道不想有空行
When I use Tidy HTML in Coda It's clean but I don't like to have empty line
<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
我看到了这个问题如何使HTML Tidy在关闭标签前不放置换行符?但这对我没有帮助.
I see that question How do I get HTML Tidy to not put newline before closing tags? but that doesn't help me.
有什么激活选项?
此配置没有空行,但没有缩进:
this config is without empty line but no indent :
// 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
推荐答案
经过大量实验,我发现不添加空行的正确设置:
After much experimenting, i found the correct setting to not add blank lines:
indent: yes // Indent for human readability. "yes" because "auto" adds blank lines.
这篇关于关闭标签后的HTML Tidy新空行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!