Re: tidy mis-handles <pre> text containing <br>

On 9 Oct 2002 at 17:49, Charles Reitzel wrote:

[...]
> The input has lots of tabs and _no_ newlines. So a) I think the code is not 
> adding the right number of spaces 

The point is, surely, that there *is no* "right number of spaces". 
Tabs should not be used inside PRE, precisely because there is no way 
to tell the rendering system what the tab boundaries are.

If I code
<pre>
\t\tText
  \t    More text
</pre>
then I have no right to make assumptions about how the two pieces of 
text will line up: it depends on the tab stops, which are undefined 
(and not definable). If both IE and NS have the same defaults as my 
editor, that's luck.

HTML4.01 section 9.3.4 last para:
> The horizontal tab character (decimal 9 in [ISO10646] and [ISO88591] )
> is usually interpreted by visual user agents as the smallest non-zero
> number of spaces necessary to line characters up along tab stops that
> are every 8 characters. We strongly discourage using horizontal tabs
> in preformatted text since it is common practice, when editing, to set
> the tab-spacing to other values, leading to misaligned documents.

"Usually", not "required to be".

Mapping <br> to \n is of course another can of worms altogether.

Received on Thursday, 10 October 2002 05:52:11 UTC