代码块后继续枚举?

Continue Enumeration after Code Block?

我有一个 Markdown 枚举:

  1. sdsdf
  2. sdfsdf

some code 3. sdfsdf

由于代码块,3.显示为一个。

如何在其中一个枚举步骤中插入代码块,让枚举计数器在计数器之后正确继续?

将代码块缩进四个额外的空格,以表明它是前面列表项的一部分:

1. sdsdf
1. sdfsdf

        function foo() {
            // do something
        }

1. sdfsdf

额外的四个空格are required to include the code block in the list item:

To put a code block within a list item, the code block needs to be indented twice - 8 spaces or two tabs:

* A list item with a code block:

        <code goes here>