vars: import by default & fix option rendering

This commit is contained in:
DavHau
2024-07-02 18:42:55 +07:00
parent 3eb445cd0e
commit 85a9d82132
4 changed files with 9 additions and 6 deletions

View File

@@ -113,12 +113,13 @@ def render_option(name: str, option: dict[str, Any], level: int = 3) -> str:
"""
decls = option.get("declarations", [])
source_path, name = replace_store_path(decls[0])
print(source_path, name)
res += f"""
if decls:
source_path, name = replace_store_path(decls[0])
print(source_path, name)
res += f"""
:simple-git: [{name}]({source_path})
"""
res += "\n"
res += "\n"
return res