Re: Hyphens in comments

Hi,

> > Either we have to implement full valid SGML comment parsing, and
> > ignore the fact that it's probably not what the author intended 
> 
> That is indeed what you should to do.

Well, we will have to...

> > -- without even the possiblitiy of issuing a warning. Or else we
> > presumably violate the standard, and possibly complain about valid
> > HTML :-(
> 
> I see no possible benefit to this course of action. 

The problem is that if some page is not displayed as expected, users
tend to blame it on the browser... That's why we print warnings when
syntax errors are detected, so the user at least knows that layouting
problems may be caused by a broken page.

However, when we encounter a construct like that:

   <!--       --        -->

we can't issue an error or even a warning, because it *is* valid in
SGML, and it *might* be intended -- though it's almost sure that the
"-->" was really intended as comment end; and some (most?) browsers will
treat it like that...

But considering it closer, it's not really that bad -- the comment will
probably never terminate, and some (confusing) error will be printed
anyways, as you mentioned yourself...

-Olaf-

-- 
Don't buy away your freedom -- GNU/Linux

Received on Monday, 25 March 2002 09:51:55 UTC