feature: add qso rendering

This commit is contained in:
Prof. Dr. Matthias Jung DL9MJ
2025-05-24 12:38:15 +02:00
parent ea370cc325
commit 735f47971f
3 changed files with 65 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import mistletoe
import pytest
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
@pytest.mark.html
def test_table_html():
assertions = {
"<qso>\nfoo\n</qso>": FiftyOhmHtmlRenderer.render_tag_helper("qso", '<div class="qso_own">foo</div>', 1, 0) +"\n",
"<qso>\nfoo\n> bar\n</qso>": FiftyOhmHtmlRenderer.render_tag_helper("qso", '<div class="qso_own">foo</div><div class="qso_other">bar</div>', 1, 0) +"\n",
"<qso>\n*foo*\n> bar\n</qso>": FiftyOhmHtmlRenderer.render_tag_helper("qso", '<div class="qso_own"><em>foo</em></div><div class="qso_other">bar</div>', 1, 0) +"\n",
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == assertions[assertion]