mirror of
https://github.com/zensical/zensical.git
synced 2026-10-03 03:27:41 +00:00
fix: strip images from toc labels (#749)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
This commit is contained in:
@@ -180,4 +180,6 @@ def _cleanup_toc_label(html: str) -> str:
|
||||
html = re.sub(r"<a\s+[^>]+>(.*?)</a>", r"\1", html, flags=re.DOTALL)
|
||||
# Remove abbreviations
|
||||
html = re.sub(r"<abbr\s+[^>]+>(.*?)</abbr>", r"\1", html, flags=re.DOTALL)
|
||||
# Remove images
|
||||
html = re.sub(r"<img\s+[^>]+>", "", html, flags=re.DOTALL)
|
||||
return html # noqa: RET504
|
||||
|
||||
Reference in New Issue
Block a user