mirror of
https://github.com/golang/go
synced 2024-11-21 22:44:40 -07:00
html: don't leave "in column group" mode when ignoring a token
Pass tests6.dat, test 26: foo<col> | <col> Also pass tests through test 35: <table><tr><div><td> R=nigeltao CC=golang-dev https://golang.org/cl/5482074
This commit is contained in:
parent
076ebed0d8
commit
85fdd68bd9
@ -1166,8 +1166,8 @@ func inColumnGroupIM(p *parser) bool {
|
|||||||
case "colgroup":
|
case "colgroup":
|
||||||
if p.oe.top().Data != "html" {
|
if p.oe.top().Data != "html" {
|
||||||
p.oe.pop()
|
p.oe.pop()
|
||||||
|
p.im = inTableIM
|
||||||
}
|
}
|
||||||
p.im = inTableIM
|
|
||||||
return true
|
return true
|
||||||
case "col":
|
case "col":
|
||||||
// Ignore the token.
|
// Ignore the token.
|
||||||
@ -1176,9 +1176,10 @@ func inColumnGroupIM(p *parser) bool {
|
|||||||
}
|
}
|
||||||
if p.oe.top().Data != "html" {
|
if p.oe.top().Data != "html" {
|
||||||
p.oe.pop()
|
p.oe.pop()
|
||||||
|
p.im = inTableIM
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
p.im = inTableIM
|
return true
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Section 12.2.5.4.13.
|
// Section 12.2.5.4.13.
|
||||||
|
@ -172,7 +172,7 @@ func TestParser(t *testing.T) {
|
|||||||
{"tests3.dat", -1},
|
{"tests3.dat", -1},
|
||||||
{"tests4.dat", -1},
|
{"tests4.dat", -1},
|
||||||
{"tests5.dat", -1},
|
{"tests5.dat", -1},
|
||||||
{"tests6.dat", 26},
|
{"tests6.dat", 36},
|
||||||
}
|
}
|
||||||
for _, tf := range testFiles {
|
for _, tf := range testFiles {
|
||||||
f, err := os.Open("testdata/webkit/" + tf.filename)
|
f, err := os.Open("testdata/webkit/" + tf.filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user