Browse Source

html: remove unnecessary break

The ancestor doesn't always match with the first.

Change-Id: I0edcbffab7e19ba1731e849021ffbb7428ec48d7
Reviewed-on: https://go-review.googlesource.com/c/161857
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Kunpei Sakai 6 years ago
parent
commit
3a22650c66
1 changed files with 0 additions and 3 deletions
  1. 0 3
      html/parse.go

+ 0 - 3
html/parse.go

@@ -439,9 +439,6 @@ func (p *parser) resetInsertionMode() {
 		case a.Select:
 			if !last {
 				for ancestor, first := n, p.oe[0]; ancestor != first; {
-					if ancestor == first {
-						break
-					}
 					ancestor = p.oe[p.oe.index(ancestor)-1]
 					switch ancestor.DataAtom {
 					case a.Template: