[whatwg] Consecutive hyphen-minus characters in comments/in ACE-strings of IDNs
glenn at zewt.org
Thu Jan 6 17:21:07 PST 2011
On Thu, Jan 6, 2011 at 8:10 PM, Ian Hickson <ian at hixie.ch> wrote:
> * Helping authors not write HTML markup that might be hard to convert to
> XML, and helping authors avoid nesting comments accidentally, by
> flagging "--" sequences in comments
> * Getting out of the way of authors who want to put "--" sequences in
> comments, e.g. because they use "--" as a long dash (as I do all the
> time!), or because they want to comment out punycoded URLs.
> Currently the spec assumes the former is more important. Personally, I
> think the latter is rather more useful, but then I use "--" as long
> dashes all the time! When this was last studied, the weight of argument
> was on the stricter "disallow --" side of things, presumably.
I do this, too, and disallowing this in comments would be very annoying.
This is probably a novice question since it seems too obvious, but
rather than disallowing "--", why not disallow the entire comment
opening token, "<!--"?
This whole thing seems like something that should be left to text
editors, though, not forced. For example, if I enter "/* /* text */"
in a C file in Vim, it highlights the second "/*" in red as a warning.
I don't need the compiler to reject it.
More information about the whatwg