chore: move to top level

This commit is contained in:
banteg
2025-12-29 15:17:32 +04:00
parent a31f8c2459
commit dee204fac9
22 changed files with 102 additions and 236 deletions
+22
View File
@@ -0,0 +1,22 @@
from takopi.rendering import render_markdown
def test_render_markdown_basic_entities() -> None:
text, entities = render_markdown("**bold** and `code`")
assert text == "bold and code\n\n"
assert entities == [
{"type": "bold", "offset": 0, "length": 4},
{"type": "code", "offset": 9, "length": 4},
]
def test_render_markdown_code_fence_language_is_string() -> None:
text, entities = render_markdown("```py\nprint('x')\n```")
assert text == "print('x')\n\n"
assert entities is not None
assert any(
e.get("type") == "pre" and e.get("language") == "py" for e in entities
)
assert any(e.get("type") == "code" for e in entities)