diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-02-13 20:20:00 +0200 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-02-13 20:20:00 +0200 |
commit | 82d83f76d538c85c8096eca2257c6addd2ec0157 (patch) | |
tree | 9d25633ea2bd1e590d08c48c5aa3e0d501fec33d /Lib/html/parser.py | |
parent | a2cf8e79b96b05d92037e35736485c86aab02438 (diff) | |
download | cpython-82d83f76d538c85c8096eca2257c6addd2ec0157.tar.gz |
Fix an index and clean up comments.
Diffstat (limited to 'Lib/html/parser.py')
-rw-r--r-- | Lib/html/parser.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/html/parser.py b/Lib/html/parser.py index 9db8ab582b..aa31fbc5b1 100644 --- a/Lib/html/parser.py +++ b/Lib/html/parser.py @@ -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]) |