mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
Simplify code to remove an unnecessary test.
This commit is contained in:
parent
570764ddce
commit
30d59baecd
1 changed files with 1 additions and 2 deletions
|
@ -148,8 +148,6 @@ class HTMLParser(markupbase.ParserBase):
|
|||
k = self.parse_starttag(i)
|
||||
elif startswith("</", i):
|
||||
k = self.parse_endtag(i)
|
||||
if k >= 0:
|
||||
self.clear_cdata_mode()
|
||||
elif startswith("<!--", i):
|
||||
k = self.parse_comment(i)
|
||||
elif startswith("<?", i):
|
||||
|
@ -329,6 +327,7 @@ class HTMLParser(markupbase.ParserBase):
|
|||
self.error("bad end tag: %s" % `rawdata[i:j]`)
|
||||
tag = match.group(1)
|
||||
self.handle_endtag(tag.lower())
|
||||
self.clear_cdata_mode()
|
||||
return j
|
||||
|
||||
# Overridable -- finish processing of start+end tag: <tag.../>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue