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

后端 未结 3 1473
情书的邮戳
情书的邮戳 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 12:58

    hmm I don't see it in windows.

    I am using Tidy with ruby

       @tidy.options.output_xhtml = true
       @tidy.options.show_body_only = true
       @tidy.clean('

    Some text

    ')

    I also ran the tidy script in unbuntu (tidy -m test.htm) but did not see that problem. You can control the spacing using the options at http://tidy.sourceforge.net/docs/quickref.html#PrettyPrintHeader

提交回复
热议问题