Improve feed page

This commit is contained in:
2023-01-22 10:09:27 +01:00
parent d3849a60ab
commit 4bc2a7dc6f
3 changed files with 14 additions and 14 deletions

View File

@ -52,9 +52,9 @@ def convert_html_to_md(html: str) -> str:
for tag in soup.find_all(True):
tag.replace_with(tag.text)
# If the text ends with a newline, remove it
# return soup.text[:-1] if soup.text.endswith("\n") else soup.text
return soup.text
# Remove all leading and trailing whitespace
soup_text = soup.text
return soup_text.strip()
# Test the function