Merge pull request #246996 from pennae/nrd-empty-inlines

nixos-render-docs: fix empty inlines

authored by pennae and committed by GitHub 6fca6f9d d65015aa

+2 -2
+1 -1
pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/manual.py
··· 623 623 elif bt.type == 'footnote_ref' and (id := cast(str, bt.attrs.get('id', ''))): 624 624 result.append(XrefTarget(id, "???", None, None, target_file)) 625 625 elif bt.type == 'inline': 626 - assert bt.children 626 + assert bt.children is not None 627 627 result += self._collect_ids(bt.children, target_file, typ, False) 628 628 elif id := cast(str, bt.attrs.get('id', '')): 629 629 # 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
··· 458 458 token.attrs['id'] = f'{token.meta["label"]}.__back.{token.meta["subId"]}' 459 459 token.meta['target'] = token.meta["label"] 460 460 elif token.type == 'inline': 461 - assert token.children 461 + assert token.children is not None 462 462 generate_ids(token.children) 463 463 464 464 def footnote_ids(state: markdown_it.rules_core.StateCore) -> None: