feat: parse questions von @dl9mj

This commit is contained in:
Tim Grelka
2025-02-16 21:44:45 +01:00
parent 04a20e6121
commit 9ea98a941d
5 changed files with 87 additions and 6 deletions
+9 -4
View File
@@ -1,12 +1,17 @@
import mistletoe
from mistletoe import Document
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
def question_stub(input):
return f"<question>{input}</question>" # TODO implement this stub
def test_html(capsys):
with capsys.disabled():
with open("test/acceptanceTest.md") as file:
content = file.read()
output = mistletoe.markdown(content, FiftyOhmHtmlRenderer)
with open("test/acceptanceTest.html", "w") as output_file:
output_file.write(output)
with FiftyOhmHtmlRenderer(question_stub) as renderer:
output = renderer.render(Document(content))
with open("test/acceptanceTest.html", "w") as output_file:
output_file.write(output)