mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
bpo-45421: Remove dead code from html.parser (GH-28847)
Support for HtmlParserError was removed back in 2014 with commit
73a4359eb0
, however this small block was
missed.
This commit is contained in:
parent
cfb1df3b71
commit
562c0d7398
1 changed files with 0 additions and 7 deletions
|
@ -328,13 +328,6 @@ class HTMLParser(_markupbase.ParserBase):
|
||||||
|
|
||||||
end = rawdata[k:endpos].strip()
|
end = rawdata[k:endpos].strip()
|
||||||
if end not in (">", "/>"):
|
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])
|
self.handle_data(rawdata[i:endpos])
|
||||||
return endpos
|
return endpos
|
||||||
if end.endswith('/>'):
|
if end.endswith('/>'):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue