This question already has an answer here:
when trying to create a list and including a code-block in one of the points, either you can't properly format the codeblock as such, or you reset the numbered list counter.
imagine following scenario:
- Some explanation or reasoning
adding a language declaration to make the codeblock render
here comes the codeblock
- Second point in chain of reasoning