Skip to content

Commit f362449

Browse files
committed
fix: deprecated warning in BS 4.0.0
1 parent f6447b0 commit f362449

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mkdocs_embed_file_plugins/src/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import re
2+
23
from bs4 import BeautifulSoup
34

5+
46
def strip_comments(markdown):
57
file_content = markdown.split("\n")
68
markdown = ""
@@ -36,6 +38,6 @@ def add_not_found_class(html):
3638
if attr != "href":
3739
new_tag[attr] = a_tag[attr]
3840
new_tag["src"] = clean_href
39-
a_tag.replaceWith(new_tag)
41+
a_tag.replace_with(new_tag)
4042

4143
return str(soup)

0 commit comments

Comments
 (0)