mirror of
https://github.com/golang/go
synced 2024-11-20 04:34:41 -07:00
html: ignore <col> tag outside tables
Pass tests1.dat, test 109: <table><col><tbody><col><tr><col><td><col></table><col> | <html> | <head> | <body> | <table> | <colgroup> | <col> | <tbody> | <colgroup> | <col> | <tbody> | <tr> | <colgroup> | <col> | <tbody> | <tr> | <td> | <colgroup> | <col> Also pass test 110: <table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup> R=nigeltao CC=golang-dev https://golang.org/cl/5369069
This commit is contained in:
parent
83f61a27d6
commit
0a61c846ef
@ -667,6 +667,8 @@ func inBodyIM(p *parser) (insertionMode, bool) {
|
||||
case "image":
|
||||
p.tok.Data = "img"
|
||||
return inBodyIM, false
|
||||
case "caption", "col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th", "thead", "tr":
|
||||
// Ignore the token.
|
||||
default:
|
||||
// TODO.
|
||||
p.addElement(p.tok.Data, p.tok.Attr)
|
||||
|
@ -133,7 +133,7 @@ func TestParser(t *testing.T) {
|
||||
n int
|
||||
}{
|
||||
// TODO(nigeltao): Process all the test cases from all the .dat files.
|
||||
{"tests1.dat", 109},
|
||||
{"tests1.dat", 111},
|
||||
{"tests2.dat", 0},
|
||||
{"tests3.dat", 0},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user