[thelist] HTML Comments and Double Hyphens on Netscape 6.1 an d 6.2
Judah McAuley
judah at wiredotter.com
Thu Jun 20 19:12:01 CDT 2002
Ray Hill wrote:
>>"White space is not permitted between the markup declaration
>>open delimiter("<!") and the comment open delimiter ("--"),
>>but is permitted between the comment close delimiter ("--")
>>and the markup declaration close delimiter (">").
>
>
> Interesting. But by that rule, it would interpret:
>
> <!-- Header Table -- Begin -->
>
> as:
>
> <!-- Header Table --> Begin -->
>
> which would theoretically print
>
> Begin --> to the screen.
I think thats a misreading of the standard. All the standard says is
that whitespace is permitted between the -- and the > character at the
end of the comment. The string " Begin --" counts as whitespace because
there is a space followed some time later by the actual end character
"<". So the spec says the "-- somegarbagehere>" is functionally
equivalent to "-- >" which is functionally equivalent to "-->". The
comment is not considered closed until the markup declaration close
delimiter (">") is found.
Its not completely clear to me, however, whether
"--thisistextwithoutaspace>" would count as an end comment since it does
not contain whitespace. I suspect that it would not be valid, but I'm
not sure.
Judah
More information about the thelist
mailing list