mirror of
https://github.com/golang/go
synced 2024-11-20 01:14:40 -07:00
html: move <link> element from after <head> into <head>
Pass tests1.dat, test 85: <head><meta></head><link> | <html> | <head> | <meta> | <link> | <body> R=nigeltao CC=golang-dev https://golang.org/cl/5297079
This commit is contained in:
parent
a7f1141dee
commit
46308d7d11
@ -427,6 +427,7 @@ func beforeHeadIM(p *parser) (insertionMode, bool) {
|
||||
}
|
||||
if add || implied {
|
||||
p.addElement("head", attr)
|
||||
p.head = p.top()
|
||||
}
|
||||
return inHeadIM, !implied
|
||||
}
|
||||
@ -511,7 +512,9 @@ func afterHeadIM(p *parser) (insertionMode, bool) {
|
||||
case "frameset":
|
||||
// TODO.
|
||||
case "base", "basefont", "bgsound", "link", "meta", "noframes", "script", "style", "title":
|
||||
// TODO.
|
||||
p.oe = append(p.oe, p.head)
|
||||
defer p.oe.pop()
|
||||
return useTheRulesFor(p, afterHeadIM, inHeadIM)
|
||||
case "head":
|
||||
// TODO.
|
||||
default:
|
||||
|
@ -133,7 +133,7 @@ func TestParser(t *testing.T) {
|
||||
rc := make(chan io.Reader)
|
||||
go readDat(filename, rc)
|
||||
// TODO(nigeltao): Process all test cases, not just a subset.
|
||||
for i := 0; i < 85; i++ {
|
||||
for i := 0; i < 86; i++ {
|
||||
// Parse the #data section.
|
||||
b, err := ioutil.ReadAll(<-rc)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user