napoleon icon indicating copy to clipboard operation
napoleon copied to clipboard

Compact literal blocks in examples

Open 0bsearch opened this issue 7 years ago • 2 comments

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

0bsearch avatar May 24 '18 10:05 0bsearch

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

Examples:
    ::

        a + b == c

McSinyx avatar Apr 09 '20 09:04 McSinyx

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.

ni-vkharkovets avatar Apr 09 '20 09:04 ni-vkharkovets