from imwald.core.md_render import markdown_html_fragment, markdown_plain_summary def test_plain_summary_strips_markdown_noise() -> None: s = markdown_plain_summary("# Title\n\nHello **world**", max_len=80) assert "Title" in s and "world" in s assert "**" not in s and "#" not in s def test_markdown_renders_strong() -> None: html = markdown_html_fragment("Hello **world**") assert "world" in html or "world" in html def test_markdown_fenced_code() -> None: html = markdown_html_fragment("```\n1 + 1\n```") assert "
" in html and "" in html