Skip to content

Multiple-paragraph param descriptions not rendered correctly in the docs #4074

@corranwebster

Description

@corranwebster

Describe the bug

The documentation does not seem to be building parameter descriptions pulled from docstrings which contain multiple paragraphs or other constructs like lists inside a :param: block.

Steps to reproduce

Go to https://toga.beeware.org/en/latest/reference/api/widgets/tree/ and look at the "accessor" parameter.

The source for this looks like this:

:param accessors: Defines the attributes of the data source that will be used to
populate each column. Must be either:
* `None` to derive accessors from the headings, as described above; or
* A list of the same size as `headings`, specifying the accessors for each
heading. A value of [`None`][] will fall back to the default generated
accessor; or
* A dictionary mapping headings to accessors. Any missing headings will fall
back to the default generated accessor.

Other multi-paragraph :param: blocks are similarly rendered as one paragraph.

Expected behavior

The markdown contained in the param description should be fully respected.

Screenshots

From the current website
Image

Environment

  • Operating System: All
  • Python version: All
  • Software versions:
    • Toga: current main branch

Logs

No response

Additional context

If it isn't possible to get this to work because the tools don't support it, then a number of docstrings probably need to be re-worked to put the deeper description of parameter behaviour in the body of the docstring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA crash or error in behavior.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions