Do not overwrite input variable for flexibility

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-01-09 18:21:34 +01:00
1 parent a5f586fda2
commit 32a97eb306
1 file changed
+3 -3
+3 -3
View File
@@ -408,15 +408,15 @@ def search_files(
return matches
def render_html(text: str) -> str:
def render_html(html: str) -> str:
"""
Remove HTML tags and decode HTML entities from text while preserving the actual content.
This keeps type information and structure but removes all formatting.
:param text: HTML text to clean
:param html: HTML text to clean
:return: Plain text without HTML tags and with decoded entities
"""
soup = BeautifulSoup(text, "html.parser")
soup = BeautifulSoup(html, "html.parser")
# join text with spaces to avoid concatenation of words
text = soup.get_text(separator=" ", strip=True)