4

I believe the following example needs no explanation.

  1. What is going on here?
  2. Why would you do this?

    (function() {

    // Do Stuff
    

    })();

3
  • Duplicate of meta.stackexchange.com/questions/25368/…, meta.stackexchange.com/questions/23822/…, and probably others also.
    – mmyers
    Commented Jan 23, 2010 at 20:54
  • I should have figured that something like this would have been spotted before. Although in my defense it is not immediately clear what search terms would find those duplicates. Commented Jan 23, 2010 at 20:56
  • Actually, it depends on whether you're trying to put the code into the list or right after it. If the former, then there is a different set of duplicates. And as for search terms, probably [markdown] [bug] would get you close.
    – mmyers
    Commented Jan 23, 2010 at 20:57

2 Answers 2

3

I'm note sure about what should happen (the original markdown spec leaves out all the edge cases), but I guess this is what you want:

  1. What is going on here?

  2. Why would you do this?

    (function() {
    
       // Do Stuff
    
    })();
    
  3. All is back to good.

Just add another four spaces.

1
  • This is a workaround I can live with. Commented Jan 23, 2010 at 20:59
4

see https://meta.stackoverflow.com/editing-help

search for "skip a line and indent eight spaces" to see the example

  1. What is going on here?
  2. Why would you do this?

    (function() {        
        // Do Stuff       
     })();
    

Note that there is indeed a bug having to do with blank lines inside code that is itself inside a list.

You must log in to answer this question.

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