Closed remiconnesson closed 1 year ago
Thanks for taking the time to submit this issue.
It seems that it is not a bug, but the intentional behavior of sphinx. The same behavior occurs for all output formats.
I think it looks weird here because I didn't add a colon (":") after the "Parameters" title. If I'll add it, the output code would be as follows:
### func.func1(param1: int)
This is a function with a single parameter.
* **Parameters:**
**param1** – This is a single parameter.
And it would look like this:
This is a function with a single parameter.
Will this solution be helpful for you?
Thanks for taking the time to submit this issue.
It seems that it is not a bug, but the intentional behavior of sphinx. The same behavior occurs for all output formats.
I think it looks weird here because I didn't add a colon (":") after the "Parameters" title. If I'll add it, the output code would be as follows:
### func.func1(param1: int) This is a function with a single parameter. * **Parameters:** **param1** – This is a single parameter.
And it would look like this:
func.func1(param1: int)
This is a function with a single parameter.
- Parameters: param1 – This is a single parameter.
Will this solution be helpful for you?
Yes that would totally make sense :)
Thank you very much
@remiconnesson Please update to the latest version. If the solution works for you, please close this issue.
Perfect thank you!
When processing a list with a single item sphinx-markdown-builder will not add a list marker in front of the single item.
This bug does not happen when a list has more than one item.
Steps to reproduce the behavior:
Try to document a docstring with only one parameter listed. This will result in incorrect markdown.
for example:
A minimal reproduction is available here:
https://github.com/remiconnesson/repro-sphinx-md-list-with-single-item/tree/main
detailed reproduction
files
requirements.txt
src/func.py
docs/index.rst
docs/conf.py
ROOT_DIR = Path(file).parents[1] sys.path.append(str(ROOT_DIR / 'src'))
extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
]
source_suffix = ['.rst']
src/func.py