W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2003

How to prevent tidy from inserting new line after <br>?

From: Peter Macej <Peter.Macej@tuke.sk>
Date: Tue, 14 Jan 2003 15:00:14 +0100
To: <html-tidy@w3.org>
Message-ID: <IIEJKJLJGCOKALKMBIBJMEPLCEAA.Peter.Macej@tuke.sk>

Tidy always adds new line after <br> tag, even in <pre> tag. This affects
result. I played with every possible tidy config, but I cannot turn off this
behaviour. It's only OK when markup=no but then < > & etc. are not replaced
by escape sequences.

Example:

<HTML>
<BODY>
<pre>
  line1<br>  line2
<pre>
</BODY>
</HTML>

After processing with tidy:
<HTML>
<BODY>
<pre>
  line1<br>
  line2
<pre>
</BODY>
</HTML>

The output is not the same, one line break is added in browser because new
lines in source are not ignored. I cannot stop using <br> because that text
is automatically generated from other program.

Is there a way how to escape < > & and let <pre> untouched?

Thank you

Peter Macej
Received on Tuesday, 14 January 2003 09:02:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:53 GMT