nixos-render-docs: don't render empty descriptions at all
This commit is contained in:
parent
11daebd2d9
commit
32136b1b01
1 changed files with 2 additions and 2 deletions
|
@ -107,9 +107,9 @@ class BaseConverter(Converter):
|
|||
|
||||
def _render_description(self, desc: str | dict[str, str]) -> list[str]:
|
||||
if isinstance(desc, str) and self._markdown_by_default:
|
||||
return [ self._render(desc) ]
|
||||
return [ self._render(desc) ] if desc else []
|
||||
elif isinstance(desc, dict) and desc.get('_type') == 'mdDoc':
|
||||
return [ self._render(desc['text']) ]
|
||||
return [ self._render(desc['text']) ] if desc['text'] else []
|
||||
else:
|
||||
raise Exception("description has unrecognized type", desc)
|
||||
|
||||
|
|
Loading…
Reference in a new issue