Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML Tidy new empty line after closing tags

Tags:

htmltidy

coda

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>

I try to edit config without success

// 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

I see that question How do I get HTML Tidy to not put newline before closing tags? but that doesn't help me.

What is the option to activate ?

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  
like image 684
benoît Avatar asked Oct 11 '12 15:10

benoît


1 Answers

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.
like image 163
Cees Timmerman Avatar answered Oct 08 '22 16:10

Cees Timmerman