Skip to content

Commit b0ae0c2

Browse files
committed
Ensure we only ever reparse *once*
1 parent 1d9f391 commit b0ae0c2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

html5lib/html5parser.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@ def _parse(self, stream, innerHTML=False, container="div",
8989
parser=self, **kwargs)
9090
self.reset()
9191

92-
while True:
93-
try:
94-
self.mainLoop()
95-
break
96-
except ReparseException:
97-
self.reset()
92+
try:
93+
self.mainLoop()
94+
except ReparseException:
95+
self.reset()
96+
self.mainLoop()
9897

9998
def reset(self):
10099
self.tree.reset()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy