[whatwg] Consecutive hyphen-minus characters in comments/in ACE-strings of IDNs

On Thu, 6 Jan 2011, Glenn Maynard wrote:
> 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, "<!--"?

That wouldn't help with the XML case, which IIRC is the main reason for 
the current state of affairs here.


> 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.

The "compiler" here is the browser -- and the browser won't reject "--" in 
a comment. Only the validator will. The validator is the equivalent of the 
lint tool in Vim. Conformance requirements are a QA tool, they don't limit 
what user agents do.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 6 January 2011 17:55:52 UTC