1

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?

4
  • 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. Commented Jul 30, 2014 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
    Commented Jul 30, 2014 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. Commented Jul 30, 2014 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
    Commented Jul 30, 2014 at 19:31

1 Answer 1

5
  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)

4
  • 1
    Why did my list break then?
    – Sifu
    Commented Jul 30, 2014 at 19:21
  • 2
    @Sifu because you did not have any space so the markdown thought the list is finished. Commented Jul 30, 2014 at 19:24
  • ".. so the markdown thought the list is finished". This is the key component here.
    – nhaarman
    Commented Jul 30, 2014 at 19:42
  • @Niek true, that's why we can add extra spaces to tell the markdown "no, list isn't finished just yet" Commented Jul 30, 2014 at 22:13

You must log in to answer this question.

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