feat: add xhtmlmp renderer

This commit is contained in:
randogoth 2026-09-26 12:41:09 +03:00
parent 3ed0b5807c
commit 3af44fb0ac
14 changed files with 524 additions and 7 deletions

View file

@ -16,7 +16,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))
from conftest import EXAMPLES, GOLDEN, render_file # noqa: E402
from golden_cases import CASES, MULTI_CASES # noqa: E402
from golden_cases import CASES, MULTI_CASES, XHTMLMP_CASES # noqa: E402
def main() -> int:
@ -37,6 +37,11 @@ def main() -> int:
document.text, encoding="utf-8"
)
print(f"wrote {name}/ ({len(list(directory.iterdir()))} files)")
for name, (source, options) in XHTMLMP_CASES.items():
output = render_file(EXAMPLES / source, renderer_name="xhtmlmp", **options)
(GOLDEN / f"{name}.xhtml").write_text(output, encoding="utf-8")
print(f"wrote {name}.xhtml")
return 0