How do I get HTML Tidy to not put newline before closing tags?

后端 未结 3 1476
情书的邮戳
情书的邮戳 2020-12-16 12:19

HTML Tidy has this infuriating habit of putting a newline before the closing tag. For example:

Some text

<
3条回答
  •  醉酒成梦
    2020-12-16 13:10

    Make sure vertical-space is set to no. After much frustration I learned the only thing that switch does is screw up your already somewhat-nicely formatted html by adding newlines where you don't want them.

    This is what I use for minimally-invasive tidying (no adding doctypes/head tags, etc.):

    tidy -mqi --doctype omit --show-body-only true --show-warnings no --vertical-space no --wrap 0

提交回复
热议问题