"""Markdown rendering and sanitisation.
Model output is untrusted input: it routinely contains HTML and a model can be
talked into emitting a script tag. These are the tests that keep that boundary.
"""
from __future__ import annotations
from lembas.services.markdown import escape_text, render_markdown
def test_basic_formatting():
html = render_markdown("Some **bold** and *italic* text.")
assert "bold" in html
assert "italic" in html
def test_script_tags_are_stripped():
html = render_markdown("Hello world")
assert "\n```")
assert "