fix: preserve falsey values in world-class HTML

This commit is contained in:
yaojingang
2026-06-14 14:26:13 +08:00
parent 5651053b8b
commit fd5a790df9
4 changed files with 9 additions and 2 deletions
@@ -24,7 +24,7 @@ def rel_path(path: Path, root: Path) -> str:
def html_text(value: Any) -> str:
return html.escape(str(value or ""), quote=True)
return html.escape("" if value is None else str(value), quote=True)
def by_key(items: list[dict[str, Any]], key_name: str) -> dict[str, dict[str, Any]]: