diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-14 15:41:54 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-14 15:41:54 +0000 |
commit | 7da93e24295c8b313ecdcedee0b8bde70b335e61 (patch) | |
tree | e3de46cbc89d82ca1f49843fe2e1e670db67795e /libgo/go/html/parse.go | |
parent | f86a7907050666ce7cab2890b353619f83d6c98b (diff) | |
download | ppe42-gcc-7da93e24295c8b313ecdcedee0b8bde70b335e61.tar.gz ppe42-gcc-7da93e24295c8b313ecdcedee0b8bde70b335e61.zip |
libgo: Update to weekly.2011-12-06.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182338 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/html/parse.go')
-rw-r--r-- | libgo/go/html/parse.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libgo/go/html/parse.go b/libgo/go/html/parse.go index 97fbc514d82..dd2d8165bdb 100644 --- a/libgo/go/html/parse.go +++ b/libgo/go/html/parse.go @@ -515,7 +515,19 @@ func afterHeadIM(p *parser) bool { implied bool ) switch p.tok.Type { - case ErrorToken, TextToken: + case ErrorToken: + implied = true + framesetOK = true + case TextToken: + s := strings.TrimLeft(p.tok.Data, whitespace) + if len(s) < len(p.tok.Data) { + // Add the initial whitespace to the current node. + p.addText(p.tok.Data[:len(p.tok.Data)-len(s)]) + if s == "" { + return true + } + p.tok.Data = s + } implied = true framesetOK = true case StartTagToken: @@ -535,7 +547,8 @@ func afterHeadIM(p *parser) bool { defer p.oe.pop() return inHeadIM(p) case "head": - // TODO. + // Ignore the token. + return true default: implied = true framesetOK = true |