3

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:

  1. Some explanation or reasoning
    adding a language declaration to make the codeblock render
here comes the codeblock
  1. Second point in chain of reasoning

marked as duplicate by hims056, Vogel612's Shadow, michaelb958, Martijn Pieters, Danubian Sailor Feb 27 '14 at 10:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    @m0sa - or better status-already-completed. – hims056 Feb 27 '14 at 9:39
4

It works as described in the markdown help:

enter image description here

6

Code within lists needs additional indentation (8-spaces):

  1. Some explanation or reasoning
    adding a language declaration to make the codeblock render

    here comes the codeblock
    
  2. Second point in chain of reasoning

Markdown:

1. Some explanation or reasoning  
adding a language declaration to make the codeblock render

        here comes the codeblock

2. Second point in chain of reasoning

See: How to nest code within a list using Markdown

Not the answer you're looking for? Browse other questions tagged .