docopt usage not formatted correctly by sphinx

161 Views Asked by At

Consider the following doc-string for docopt:

Usage:
    foo [options]
    foo [options] <input.yaml>

Options:
    -h, --help
        Show help.

when formatting with Sphinx the options are formatted very nicely (bold options, with regular, indented, description).

However, the usage is formatted poorly: everything is on a single line. My question: how can I format such that there is at least the line-break between the different use-cases, but in such a way that docopt is not broken? In particular, the following Sphinx solutions break docopt:

Usage:
|    foo [options]
|    foo [options] <input.yaml>
Usage:
    foo [options]

    foo [options] <input.yaml>
0

There are 0 best solutions below