Re: comments (was Re: html tidy problem)

On Tue, 9 Jan 2001, Ingala, Michael wrote:

> Dave,
> When I use the codesweeper in HomeSite 4.5 to HTMLTidy my code, it's
> changing my comments <!--- ---> to <!--- =-->. A coworker is not having this
> problem so I'm unsure if it's a "tidy thing" or a "my computer" thing.

It's fixed a problem with your code. Comments come between *pairs*
of hyphens, so your comments are parsed like this:

  "<!--"    start of comment
  "- "      comment
  "--"      end of comment
  "->"      syntax error

HTML Tidy changes it so that there is no double hyphen until the
(intended) end of the comment:

  "<!--"    start of comment
  "- ="     comment
  "-->"     end of comment

I suggest you change <!--- and ---> to <!-- and --> respectively
throughout your code. (Is it being generated by HomeSite?)

hth,
-- 
Daniel Biddle <deltab@osian.net>

Received on Wednesday, 10 January 2001 07:33:43 UTC