[imps] optgroup in option

Ryan King ryan at theryanking.com
Mon Oct 13 18:11:24 PDT 2008

I'm working on updating the ruby part of html5lib to the latest spec  
and test suite, but ran into what I think is an inconsistency between  
the two.

We have a test that where an <optgroup> is nested inside an <option>[1].

 From my reading of the spec, the <optgroup> token should generate an  
implied </option>[2]. Unless I'm wrong, and we shouldn't be in the 'in  
body' mode at this point.

Henri's implementation appears to follow the test suite[3], so I  
assume that I'm missing something. Any pointers would be appreciated.


1. http://code.google.com/p/html5lib/source/browse/trunk/testdata/tree-construction/tests1.dat#454

2. http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#parsing-main-inbody

3. http://livedom.validator.nu/?%3C!DOCTYPE%20html%3EA%3Coption%3EB%3Coptgroup%3EC%3Cselect%3ED%3C%2Foption%3EE%0A%0A

More information about the Implementors mailing list