Re: dealing with new-lines

Dan Connolly <>
Message-id: <>
To: "Thomas A. Fine" <>,
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 <>

>>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

SGML is a mess!