mirror of
https://github.com/MillironX/nfdocs-parser.git
synced 2024-11-22 00:56:04 +00:00
Add check for zero docs of that type
Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
parent
6b0fee69b2
commit
c8d642002b
1 changed files with 16 additions and 15 deletions
|
@ -159,22 +159,23 @@ class NFDocs(Directive):
|
||||||
|
|
||||||
# Try to convert each definition to a node
|
# Try to convert each definition to a node
|
||||||
for block_type, block_docs in docstrings.items():
|
for block_type, block_docs in docstrings.items():
|
||||||
block_section = nodes.section()
|
if len(block_docs) > 0:
|
||||||
block_section += nodes.title(text=block_type.capitalize())
|
block_section = nodes.section()
|
||||||
for proc_name, proc_docs in block_docs.items():
|
block_section += nodes.title(text=block_type.capitalize())
|
||||||
proc_section = nodes.section()
|
for proc_name, proc_docs in block_docs.items():
|
||||||
proc_section += nodes.title(text=proc_name)
|
proc_section = nodes.section()
|
||||||
proc_section += nodes.paragraph(text=proc_docs["summary"])
|
proc_section += nodes.title(text=proc_name)
|
||||||
io_methods = ["input", "output"]
|
proc_section += nodes.paragraph(text=proc_docs["summary"])
|
||||||
for met in io_methods:
|
io_methods = ["input", "output"]
|
||||||
if met in proc_docs.keys():
|
for met in io_methods:
|
||||||
io_table = params_to_table(met, proc_docs[met])
|
if met in proc_docs.keys():
|
||||||
proc_section += io_table
|
io_table = params_to_table(met, proc_docs[met])
|
||||||
self.state_machine.document.note_implicit_target(proc_section)
|
proc_section += io_table
|
||||||
block_section += proc_section
|
self.state_machine.document.note_implicit_target(proc_section)
|
||||||
|
block_section += proc_section
|
||||||
|
|
||||||
self.state_machine.document.note_implicit_target(block_section)
|
self.state_machine.document.note_implicit_target(block_section)
|
||||||
return_nodes.append(block_section)
|
return_nodes.append(block_section)
|
||||||
|
|
||||||
return return_nodes
|
return return_nodes
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue