Markdown: continue numbered list

前端 未结 12 1596
予麋鹿
予麋鹿 2020-12-04 04:39

In the following markdown code I want item 3 to start with list number 3. But because of the code block in between markdown starts this list item as a new list.

12条回答
  •  渐次进展
    2020-12-04 05:38

    Macmade's solution doesn't work for me anymore on my Jekyll instance on Github Pages anymore but I found this solution on an issue for the kramdown github repo. For OP's example it would look like this:

    1. item 1
    2. item 2
    
    ```
    Code block
    ```
    
    {:start="3"}
    3. item 3
    

    Solved my issues handily.

提交回复
热议问题