Closed msto closed 5 months ago
Thanks for the report. That looks like a simple bug in the doc mangling routine. Can you check that the following patch fixes the issue for you?
diff --git i/src/defopt.py w/src/defopt.py
index 5a5e9f9..f3f0cd5 100644
--- i/src/defopt.py
+++ w/src/defopt.py
@@ -976,7 +976,7 @@ def _parse_docstring(doc):
visitor = Visitor(self.document)
field_body_node.walkabout(visitor)
if doctype in ['param', 'type']:
- self.params[name][doctype] = ''.join(visitor.paragraphs)
+ self.params[name][doctype] = '\n\n'.join(visitor.paragraphs)
elif doctype in ['raises']:
self.raises.append(name)
raise SkipNode
Committed the fix. Thanks for the report!
Hi,
Would it be possible to support blank lines and nested indentation in an argument's help?
e.g. in this example, it'd be helpful to align the special note with its parent bullet, and add a line of space between the summary and the list of fields.
Current formatting and output:
Desired formatting and output: