css - Why is html-tidy forcing my styles onto one line? -


html-tidy insists on minifying style block single line. this:

<style> p { background-color: red; }  #first {border: 2px solid blue}  </style> 

gets tidied this:

<style>p { background-color: red; } #first {border: 2px solid blue}</style> 

i want keep <style> block readable, i'd take variation long treats <style> block level element, don't see way force that. closest option can see new-blocklevel-tags, doesn't have impact , doesn't make sense option anyway.

how stop html-tidy minifying css blocks inside of style tags?

what call minifying removal of indenting. minifying mean complete removal of spaces, tabs , line breaks code, outputting 1 line, compressing css in 1 file , javascript in another.

tidy not capable of preserving original indenting of markup input receives. that’s because tidy starts building clean parse tree input, , parse tree doesn’t contain information original indenting. tidy pretty-prints parse tree using current config settings. trying preserve original indenting input interact badly repair operations needed build clean parse tree, , considerably complicate code.

complete documentation here.

if want keep indenting, stop using tidy.

response proposed change amanda: not agree "if want a, don't b" hostile phrase construction , "if want a, consider not doing b" should used instead. me, second construct has more hostility, since common structure ironic comments. don't want that. when advise own kid, best intentions, not put hand on stove if doesn't want burns, don't "consider not putting hand on stove". say: "if don't want burns, don't put hand on stove." [informative. friendly. not hostile.]


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -