diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-14 15:41:54 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-14 15:41:54 +0000 |
commit | d5363590597572228d4e0d0ae13f3469176ceb14 (patch) | |
tree | e3de46cbc89d82ca1f49843fe2e1e670db67795e /libgo/go/html/parse.go | |
parent | ef0d4c4d9937276c8ff818ecb0b92925d322d3bd (diff) | |
download | gcc-d5363590597572228d4e0d0ae13f3469176ceb14.zip gcc-d5363590597572228d4e0d0ae13f3469176ceb14.tar.gz gcc-d5363590597572228d4e0d0ae13f3469176ceb14.tar.bz2 |
libgo: Update to weekly.2011-12-06.
From-SVN: r182338
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 97fbc51..dd2d816 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 |