diff --git a/aider/scrape.py b/aider/scrape.py index 9a7387585..659f4168e 100755 --- a/aider/scrape.py +++ b/aider/scrape.py @@ -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