mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
Fix an index and clean up comments.
This commit is contained in:
parent
7f728c1e1a
commit
e31ddedb0e
2 changed files with 2 additions and 2 deletions
|
@ -270,12 +270,13 @@ class HTMLParser(_markupbase.ParserBase):
|
|||
if rawdata[i:i+2] != '<!':
|
||||
self.error('unexpected call to parse_html_declaration()')
|
||||
if rawdata[i:i+4] == '<!--':
|
||||
# this case is actually already handled in goahead()
|
||||
return self.parse_comment(i)
|
||||
elif rawdata[i:i+3] == '<![':
|
||||
return self.parse_marked_section(i)
|
||||
elif rawdata[i:i+9].lower() == '<!doctype':
|
||||
# find the closing >
|
||||
gtpos = rawdata.find('>', 9)
|
||||
gtpos = rawdata.find('>', i+9)
|
||||
if gtpos == -1:
|
||||
return -1
|
||||
self.handle_decl(rawdata[i+2:gtpos])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue