Delete cases that just fall down to "anything else" action.
Handle </tbody>, </tfoot>, and </thead>.
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/
6203061
// Section 12.2.5.4.14.
func inRowIM(p *parser) bool {
switch p.tok.Type {
- case ErrorToken:
- // TODO.
- case TextToken:
- // TODO.
case StartTagToken:
switch p.tok.Data {
case "td", "th":
}
// Ignore the token.
return true
- default:
- // TODO.
}
case EndTagToken:
switch p.tok.Data {
// Ignore the token.
return true
case "tbody", "tfoot", "thead":
- // TODO.
+ if p.elementInScope(tableScope, p.tok.Data) {
+ p.parseImpliedToken(EndTagToken, "tr", nil)
+ return false
+ }
+ // Ignore the token.
+ return true
case "body", "caption", "col", "colgroup", "html", "td", "th":
// Ignore the token.
return true
- default:
- // TODO.
}
- case CommentToken:
- p.addChild(&Node{
- Type: CommentNode,
- Data: p.tok.Data,
- })
- return true
}
+
return inTableIM(p)
}