circular-fix
Some checks failed
Deploy on push / deploy (push) Failing after 17s

This commit is contained in:
2025-08-17 16:33:54 +03:00
parent bc8447a444
commit e78e12eeee
65 changed files with 3304 additions and 1051 deletions

View File

@@ -3,10 +3,9 @@
"""
import re
from typing import Optional
def extract_text(html_content: Optional[str]) -> str:
def extract_text(html_content: str | None) -> str:
"""
Извлекает текст из HTML с помощью регулярных выражений.
@@ -25,10 +24,8 @@ def extract_text(html_content: Optional[str]) -> str:
# Декодируем HTML-сущности
text = re.sub(r"&[a-zA-Z]+;", " ", text)
# Заменяем несколько пробелов на один
text = re.sub(r"\s+", " ", text).strip()
return text
# Убираем лишние пробелы
return re.sub(r"\s+", " ", text).strip()
def wrap_html_fragment(fragment: str) -> str: