LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2010 The Go Authors. All rights reserved. | 1 // Copyright 2010 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package html | 5 package html |
6 | 6 |
7 import ( | 7 import ( |
8 "io" | 8 "io" |
9 "strings" | 9 "strings" |
10 ) | 10 ) |
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 case StartTagToken: | 1219 case StartTagToken: |
1220 switch p.tok.Data { | 1220 switch p.tok.Data { |
1221 case "html": | 1221 case "html": |
1222 // TODO. | 1222 // TODO. |
1223 case "option": | 1223 case "option": |
1224 if p.top().Data == "option" { | 1224 if p.top().Data == "option" { |
1225 p.oe.pop() | 1225 p.oe.pop() |
1226 } | 1226 } |
1227 p.addElement(p.tok.Data, p.tok.Attr) | 1227 p.addElement(p.tok.Data, p.tok.Attr) |
1228 case "optgroup": | 1228 case "optgroup": |
1229 » » » // TODO. | 1229 » » » if p.top().Data == "option" { |
| 1230 » » » » p.oe.pop() |
| 1231 » » » } |
| 1232 » » » if p.top().Data == "optgroup" { |
| 1233 » » » » p.oe.pop() |
| 1234 » » » } |
| 1235 » » » p.addElement(p.tok.Data, p.tok.Attr) |
1230 case "select": | 1236 case "select": |
1231 endSelect = true | 1237 endSelect = true |
1232 case "input", "keygen", "textarea": | 1238 case "input", "keygen", "textarea": |
1233 // TODO. | 1239 // TODO. |
1234 case "script": | 1240 case "script": |
1235 // TODO. | 1241 // TODO. |
1236 default: | 1242 default: |
1237 // Ignore the token. | 1243 // Ignore the token. |
1238 } | 1244 } |
1239 case EndTagToken: | 1245 case EndTagToken: |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 consumed = p.im(p) | 1442 consumed = p.im(p) |
1437 } | 1443 } |
1438 // Loop until the final token (the ErrorToken signifying EOF) is consume
d. | 1444 // Loop until the final token (the ErrorToken signifying EOF) is consume
d. |
1439 for { | 1445 for { |
1440 if consumed = p.im(p); consumed { | 1446 if consumed = p.im(p); consumed { |
1441 break | 1447 break |
1442 } | 1448 } |
1443 } | 1449 } |
1444 return p.doc, nil | 1450 return p.doc, nil |
1445 } | 1451 } |
LEFT | RIGHT |