End literal block in list item

匆匆过客 提交于 2019-12-02 06:05:35

Yes. Whitespace is tricky. You have one extra leading space in your code and the line starting with "Description". Try this:

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

       MyCode.example()

   Description of the code shown above (not literal)

Note that the first letters of the item and description vertically align and code blocks are indented 4 spaces.

Bonus tip: I like to add a space between numbered items and its period so that it is starts at column 5. This makes it easier to indent paragraphs to 4 spaces (and code blocks 8 spaces) in my editor. And in case I have more than 9 items, then the indentation looks nicer for items 10-99.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!