Skip to content

Commit

Permalink
bpo-45421: Remove dead code from html.parser (GH-28847)
Browse files Browse the repository at this point in the history
Support for HtmlParserError was removed back in 2014 with commit
73a4359, however this small block was
missed.
  • Loading branch information
mardy committed Oct 12, 2021
1 parent cfb1df3 commit 562c0d7
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Lib/html/parser.py
Expand Up @@ -328,13 +328,6 @@ def parse_starttag(self, i):

end = rawdata[k:endpos].strip()
if end not in (">", "/>"):
lineno, offset = self.getpos()
if "\n" in self.__starttag_text:
lineno = lineno + self.__starttag_text.count("\n")
offset = len(self.__starttag_text) \
- self.__starttag_text.rfind("\n")
else:
offset = offset + len(self.__starttag_text)
self.handle_data(rawdata[i:endpos])
return endpos
if end.endswith('/>'):
Expand Down

0 comments on commit 562c0d7

Please sign in to comment.