0

Context

  1. I often try to write up my answers in a list of actions, to organize it.
  2. Then I usually put some Code that he needs to place or modify :

(Four space for Stack Overflow, ">" does the same effet here) Code here

  1. Then continue to write the list of.... Wait, why is there a number 1 to the left?

Question

Why does the list reset after the Code block?

  • All you need is a one single space before ordinary text, or four spaces before code block, to make it part of the list item. – Shadow The Curly Braced Wizard Jul 30 '14 at 19:19
  • @ShadowWizard Oh... I see. Thanks. But the starting number problem remains. We can't decide explicitly what the numbers are. Why implement this feature in the first place? – Sifu Jul 30 '14 at 19:28
  • It's useful for lazy people and greatly helps if you want to change position of one item. You can have them all start with 1. yet the order remains. – Shadow The Curly Braced Wizard Jul 30 '14 at 19:29
  • @ShadowWizard Thanks for answering my question, I'll edit my question to make it clearer for other people finding this question. – Sifu Jul 30 '14 at 19:31
4
  1. No need for such a thing
  2. Because it is very easy to

    add stuff while still keeping it inside the list

    Yes, even code.
    
  3. See? List is not broken.

Source code for the above:

1. No need for such a thing
2. Because it is very easy to

 >add stuff while still keeping it inside the list

        Yes, even code.

3. See? List is not broken.

(note the single space before the ">add..." and four spaces in addition to existing four spaces of code)

  • Why did my list break then? – Sifu Jul 30 '14 at 19:21
  • @Sifu It's black magic. Only the chosen know the art. – Mysticial Jul 30 '14 at 19:23
  • 2
    @Sifu because you did not have any space so the markdown thought the list is finished. – Shadow The Curly Braced Wizard Jul 30 '14 at 19:24
  • ".. so the markdown thought the list is finished". This is the key component here. – nhaarman Jul 30 '14 at 19:42
  • @Niek true, that's why we can add extra spaces to tell the markdown "no, list isn't finished just yet" – Shadow The Curly Braced Wizard Jul 30 '14 at 22:13

You must log in to answer this question.

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