mirror of
https://github.com/zensical/zensical.git
synced 2026-09-25 07:45:36 +00:00
fix: strip images from toc labels (#749)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
This commit is contained in:
+18
-1
@@ -80,13 +80,30 @@ class TestCleanupTocLabel:
|
||||
"\nAbbr\n",
|
||||
id="multiline_abbr",
|
||||
),
|
||||
# Images ------------------------------------------------------
|
||||
pytest.param(
|
||||
'<img src="image.png" alt="Image">',
|
||||
"",
|
||||
id="img_tag",
|
||||
),
|
||||
pytest.param(
|
||||
'<img src="image.png" alt="Image">Text',
|
||||
"Text",
|
||||
id="img_tag_with_text_after",
|
||||
),
|
||||
pytest.param(
|
||||
'Text<img src="image.png" alt="Image">',
|
||||
"Text",
|
||||
id="img_tag_with_text_before",
|
||||
),
|
||||
# Combined and passthrough ------------------------------------
|
||||
pytest.param(
|
||||
'<a href="#x">Intro to '
|
||||
'<abbr title="HyperText Markup Language">HTML</abbr>'
|
||||
'<img src="image.png" alt="Image">'
|
||||
"</a>",
|
||||
"Intro to HTML",
|
||||
id="links_and_abbreviations",
|
||||
id="combined_and_passthrough",
|
||||
),
|
||||
pytest.param(
|
||||
"Just plain text",
|
||||
|
||||
Reference in New Issue
Block a user