mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
keep hrefs
This commit is contained in:
parent
62c67a1e23
commit
2dee76378b
1 changed files with 3 additions and 1 deletions
|
@ -134,7 +134,9 @@ def slimdown_html(soup):
|
|||
tag.decompose()
|
||||
|
||||
for tag in soup.find_all(True):
|
||||
tag.attrs.clear()
|
||||
for attr in list(tag.attrs):
|
||||
if attr != "href":
|
||||
tag.attrs.pop(attr, None)
|
||||
|
||||
return soup
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue