pre-commit
This commit is contained in:
parent
4cd70670cc
commit
78df903de7
@ -49,7 +49,7 @@ def cleanup_html(string: str | None, remove_html_tables: bool = False) -> str:
|
||||
string = re.sub(r"<br>|</li>", "\n", string, flags=re.IGNORECASE)
|
||||
string = re.sub(r"<li>", "* ", string, flags=re.IGNORECASE)
|
||||
string = re.sub(r"</p>", "\n\n", string, flags=re.IGNORECASE)
|
||||
string = re.sub(r"<h([1-6])>", lambda m: '#'*int(m.group(1))+' ', string, flags=re.IGNORECASE)
|
||||
string = re.sub(r"<h([1-6])>", lambda m: "#" * int(m.group(1)) + " ", string, flags=re.IGNORECASE)
|
||||
string = re.sub(r"</h[1-6]>", "\n", string, flags=re.IGNORECASE)
|
||||
|
||||
# remove the tables
|
||||
|
Loading…
Reference in New Issue
Block a user