3 ms·
Your syntax highlighter can be trained to understand that syntax and not color it like a comment.
by chriseppstein 17y ago
Your syntax highlighter can be trained to understand that syntax and not color it like a comment.
- generalk 17y agoWell, sure, that takes care of the symptom but not the underlying issue: comments shouldn't affect runtime! To put it differently, if I remove all comments from a source file, the compiled/interpreted result should be 100% the same. If it isn't, something's wrong.
- chriseppstein 17y agoIn this case, the something wrong is that the specification didn't have the foresight to create a syntax robust enough to support actually upgrading the spec for real users. Discarding unrecognized syntax is a nice, robust behavior, but it doesn't cut it.
- knome 17y agoBy this syntax they aren't comments anymore.
- chriseppstein 17y ago@generalk You're right, I sure wish there was a better way. Do you have one? Also, you could decide to not use this particular aspect of the syntax if it offends you, could you not? Those of us who have to support ie6 for the next three years, do not have that luxury.
- generalk 17y agoFor the record, I probably will have to support IE6 for the next few years, so I don't have any luxuries here either. If we're just proposing new ideas, suppose we create a new tag to link CSS3 documents to HTML documents? <stylesheet>, perhaps. Newer browsers know what to do with it, while older browsers ignore it. This is just off the top of my head, of course, I haven't thoroughly studied this problem. I don't mean any personal offense, I just don't like the idea of putting code in comments.