nixos-render-docs: fix empty inlines

`children` only has to be not-None, not also not-[]. empty table cells
would can produce an empty inline token and cause these checks to fail,
even though the token actually is totally valid.

showed up in
https://github.com/NixOS/nixpkgs/pull/246956#discussion_r1283146120.

pennae 9c0803f8 829cbcbc

Changed files
+2 -2
pkgs
tools
nix
nixos-render-docs
src
nixos_render_docs
+1 -1
pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/manual.py
···
elif bt.type == 'footnote_ref' and (id := cast(str, bt.attrs.get('id', ''))):
result.append(XrefTarget(id, "???", None, None, target_file))
elif bt.type == 'inline':
-
assert bt.children
+
assert bt.children is not None
result += self._collect_ids(bt.children, target_file, typ, False)
elif id := cast(str, bt.attrs.get('id', '')):
# anchors and examples have no titles we could use, but we'll have to put
+1 -1
pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/md.py
···
token.attrs['id'] = f'{token.meta["label"]}.__back.{token.meta["subId"]}'
token.meta['target'] = token.meta["label"]
elif token.type == 'inline':
-
assert token.children
+
assert token.children is not None
generate_ids(token.children)
def footnote_ids(state: markdown_it.rules_core.StateCore) -> None: