feat: detect and remove comments

This commit is contained in:
Tim Grelka
2025-02-16 17:51:51 +01:00
parent 8882834136
commit 38635a7abd
3 changed files with 24 additions and 20 deletions
+6 -5
View File
@@ -9,14 +9,15 @@ from test.util import paragraph
@pytest.mark.html
def test_comment_html():
assertions = {
"%Comment\nBar": "Bar",
# TODO: This test is not working as expected. The comment should be removed
# "%Comment\n" : "a",
"Foo\n%Comment\nBar": "Foo\nBar",
# TODOD: Remove \n
"%Comment\nBar": paragraph("Bar"),
"%Comment\n": "",
"Foo 100 % Bar": paragraph("Foo 100% Bar"),
"Foo\n%Comment\nBar": paragraph("Foo") + paragraph("Bar"),
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == paragraph(assertions[assertion])
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == assertions[assertion]
@pytest.mark.latex