Skip to content

Allow to place content inside home <section> #47

@mondeja

Description

@mondeja

Currently there is no way to place content inside the same top level section created by sphinx-argparse-cli. If you try to pass content to the directive like:

.. sphinx_argparse_cli::
   :module: my_package.__main__
   :func: build_parser

   Some content

...the next error is raised:

Warning, treated as error:
/my/own/file.rst:1:Error in "sphinx_argparse_cli" directive:
no content permitted.

So it seems legit to allow adding content to the directive that would be placed inside the home section.


More context

This is specially useful when you want to add another section at the same section level of a subsection created by sphinx-argparse-cli, for example <prog> optional arguments.

Currently this is not possible at all, no matter which heading syntax you use, the next section after the directive will be placed at the same level of the home section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions