W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2002

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

From: Charles Reitzel <creitzel@rcn.com>
Date: Thu, 10 Oct 2002 10:39:02 -0400
Message-Id: <4.3.2.7.2.20021010103301.02f5f2b0@pop.rcn.com>
To: Fred.Bone@dial.pipex.com
Cc: html-tidy@w3.org

Hi Fred,

Good to see you there.  Well, "usually" is the bread and butter of Tidy.  I 
mean, you're right.  There are no guarantees (apparently).  But we do try 
to follow the principle of "interoperable compliance with the least 
surprise".  Also, there is an option for tab-size (in chars), so you can 
always tweak it to your liking.

Agree about the worms.  I am hesitant to map <br> to \n and not do anything 
about all the other markup allowed in <pre> that will still mess up the layout.

take it easy,
Charlie

At 10:25 AM 10/10/2002 +0100, you wrote:

>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 12:51:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:48 UTC