The end of a literal block in a list item

I have a list item in my first file that I would like to place in a literal block, but I cannot finish the literal block correctly.

This is my first:

1. Item 1 (not literal)
2. Item 2::

    MyCode.example()

    Description of the code shown above (not literal)

I want the paragraph starting with Descriptionto be outside the literal block above it, but still be part of list item # 2. The only workaround I could come up with is the following:

1. Item 1 (not literal)
2. Item 2:

    ::

        MyCode.example()

    Description of the code shown above (not literal)

This allows non-literal text to return to the previous level of indentation, doing everything the way I want. However, I would like to have a ::list item in the first line.

Is it possible to finish the literal block explicitly in such a way as to allow it ::to remain in the first line of the list item?

+1
1

. . , "". :

1. Item 1 (not literal)
2. Item 2::

       MyCode.example()

   Description of the code shown above (not literal)

, 4 .

: , 5. 4 ( 8 ) . , 9 , 10-99.

+3

Source: https://habr.com/ru/post/1692327/


All Articles