sphinx-contrib / napoleon

Other
149 stars 48 forks source link

Compact literal blocks in examples #3

Open 0bsearch opened 6 years ago

0bsearch commented 6 years ago

Is there any way to create example sections with short code blocks? I.e.

Examples::

    a + b == c

For now, :: is not parsed as proper section, without this, docs looks awful, there's either

Examples:
    unneeded comment::

        a + b == c

or

Examples:
    .. code-block::

        a + b == c
McSinyx commented 4 years ago

Hi, ReST code block is smart, i.e.

Examples:
    ::

        a + b == c
ni-vkharkovets commented 4 years ago

Well, yes, :: is parsed in the same way as .. code-block::, but it's still looks ugly, considering whole idea behind human-centric documentation. IMO.