mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-05 21:24:45 +00:00
Restore support for older BeautifulSoup4 versions
This commit is contained in:
parent
ccc0ee0464
commit
af0f50efa8
2 changed files with 4 additions and 4 deletions
|
|
@ -8,9 +8,6 @@ jobs:
|
|||
include:
|
||||
- python: "3.5"
|
||||
env: TOXENV=oldbs4
|
||||
allow_failures:
|
||||
- python: "3.5"
|
||||
env: TOXENV=oldbs4
|
||||
# command to install dependencies
|
||||
addons:
|
||||
apt:
|
||||
|
|
|
|||
|
|
@ -93,7 +93,10 @@ class Parser(object):
|
|||
self.handler.comment(comment)
|
||||
elif isinstance(content, Doctype):
|
||||
if hasattr(self.handler, 'doctype'):
|
||||
self.handler.doctype(content)
|
||||
self.handler.doctype(
|
||||
content[len('DOCTYPE '):]
|
||||
if content.upper().startswith('DOCTYPE ')
|
||||
else content)
|
||||
elif isinstance(content, Comment):
|
||||
if hasattr(self.handler, 'comment'):
|
||||
self.handler.comment(content.strip())
|
||||
|
|
|
|||
Loading…
Reference in a new issue