I've noticed that the HTML comments are slightly restrictive. If I have the following code:
<p> some text, <!--- order now ---> </p> <div class="msg"> ....
it will highlight everything from the start of the comment, to the end of the page. How do I fix that without going through all the flies to fix the comments?
Eric Coleman
On 6/5/2006, at 4:55, Eric Coleman wrote:
I've noticed that the HTML comments are slightly restrictive.
Indeed they are :)
If I have the following code: [...] <!--- order now ---> [...] it will highlight everything from the start of the comment, to the end of the page. How do I fix that without going through all the flies to fix the comments?
From the HTML standard chapter 3.2.4:
[...] A common error is to include a string of hyphens ("---") within a comment. Authors should avoid putting two or more adjacent hyphens inside comments.
So I would suggest fixing your comments (search’n’replace). While the HTML standard doesn’t explicitly say it (anymore, I think it did in the past), HTML comments come from SGML, and here ‘--’ changes state in the parser. So your last ‘--->’ is (if this was a strict parser) seen as ‘--’, which goes into a mode where it expects whitespace or a ‘>’ (to terminate the comment), but instead it finds another dash (‘-’).
Thanks Allan,
It's not my source code, or i'd have fixed them all by now... guy I work with, but thanks for the information.
Eric Coleman
On May 5, 2006, at 11:16 PM, Allan Odgaard wrote:
On 6/5/2006, at 4:55, Eric Coleman wrote:
I've noticed that the HTML comments are slightly restrictive.
Indeed they are :)
If I have the following code: [...] <!--- order now ---> [...] it will highlight everything from the start of the comment, to the end of the page. How do I fix that without going through all the flies to fix the comments?
From the HTML standard chapter 3.2.4:
[...] A common error is to include a string of hyphens ("---") within a comment. Authors should avoid putting two or more adjacent hyphens inside comments.
So I would suggest fixing your comments (search’n’replace). While the HTML standard doesn’t explicitly say it (anymore, I think it did in the past), HTML comments come from SGML, and here ‘--’ changes state in the parser. So your last ‘--->’ is (if this was a strict parser) seen as ‘--’, which goes into a mode where it expects whitespace or a ‘>’ (to terminate the comment), but instead it finds another dash (‘-’).
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate