From f5e5bdd778241bfefa8627f7124c39cd6ad8d74f Mon Sep 17 00:00:00 2001 From: Kunpei Sakai Date: Tue, 2 Oct 2018 01:28:04 +0900 Subject: [PATCH] html: remove unnecessary namespace checking Change-Id: I03ebb4369389262b842001e18d0594fd71b19f44 Reviewed-on: https://go-review.googlesource.com/c/138797 Run-TryBot: Kunpei Sakai TryBot-Result: Gobot Gobot Reviewed-by: Nigel Tao --- html/parse.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/html/parse.go b/html/parse.go index 9889c09b..64a57937 100644 --- a/html/parse.go +++ b/html/parse.go @@ -1264,12 +1264,6 @@ func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { switch commonAncestor.DataAtom { case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr: p.fosterParent(lastNode) - case a.Template: - // TODO: remove namespace checking - if commonAncestor.Namespace == "html" { - commonAncestor = commonAncestor.LastChild - } - fallthrough default: commonAncestor.AppendChild(lastNode) }