mirror of
https://github.com/open-webui/computer.git
synced 2026-11-30 08:55:13 -05:00
refac
This commit is contained in:
1 parent
437df5d8b8
commit
ed4630c671
119 files changed
+8531
-2882
No files matched your search
@@ -25,9 +25,7 @@ def _html_to_text(html: str) -> str:
|
||||
text = re.sub(r"<p[^>]*>", "\n\n", text, flags=re.IGNORECASE)
|
||||
text = re.sub(r"</p>", "", text, flags=re.IGNORECASE)
|
||||
text = re.sub(r"<li[^>]*>", "\n- ", text, flags=re.IGNORECASE)
|
||||
text = re.sub(
|
||||
r'<a[^>]*href="([^"]+)"[^>]*>(.*?)</a>', r"\2 (\1)", text, flags=re.IGNORECASE
|
||||
)
|
||||
text = re.sub(r'<a[^>]*href="([^"]+)"[^>]*>(.*?)</a>', r"\2 (\1)", text, flags=re.IGNORECASE)
|
||||
text = re.sub(
|
||||
r"<pre[^>]*>(.*?)</pre>", r"\n```\n\1\n```\n", text, flags=re.DOTALL | re.IGNORECASE
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user