Re: dealing with new-lines
Dan Connolly <connolly@pixel.convex.com>
Message-id: <9301080302.AA11869@pixel.convex.com>
To: "Thomas A. Fine" <fine@cis.ohio-state.edu>, www-talk@nxoc01.cern.ch
Subject: Re: dealing with new-lines
In-Reply-To: Your message of "Thu, 07 Jan 93 18:13:46 CST."
Date: Thu, 07 Jan 93 21:02:36 CST
From: Dan Connolly <connolly@pixel.convex.com>
>>How should browsers deal with new-lines, and where can html-generators
>>put in new-lines?
>
>Darn good question.
>>
>I have done both, and the results of my labors
>are available in libHTML. I have also done an elisp
>implementation, if anybody's interested.
>
>
>> <PRE> <PLAINTEXT>
>> remove ALL new-lines to left, and one new-line to the right.
>
>Why remove one new-line to the right? Just for HTML source file aesthetics?
Turns out this is standard behavior. Boy is this a can of worms.
I just went back over the comp.text.sgml archives to research this
some more, and boy was I wrong.
From what I can tell, a newline is ignored by the SGML parser
if it's right after a start tag or right before an end tag.
For the whole story, see
gopher://ifi.uio.no:70/
00/pub/SGML/comp.text.sgml/by.date/1992/05/02/230201.Naggum
SGML is a mess!
Dan