Re: Line breaks in comments.

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
Dan Tsimbala wrote:
> It's probably nothing you can help me with, but I'm just curious about
> reasons. I'm writing my own HTML DOM serializer, and I'm facing the
> following problem - all the line breaks inside comment nodes are changed
> when HTML was parsed. I'm using MAC OS X 10.5 which uses Unix line breaks
> LF, so my source contains only them. When I'm trying to serialize the source
> (and even innerHTML itself has the same issue) with my serializer the line
> breaks in the text nodes will be correct (LF), but the line break in the
> comment nodes will be replaced by CR+LF.

Is your serializer implemented directly in JavaScript, or on top of 
Gecko's DOM serializer?

Are you running on Windows or Mac (your mention of IE is confusing me a 
bit, unless you're talking about IE5).

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.