What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

I believe the following example needs no explanation.

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

    (function() {

    // Do Stuff
    

    })();

share|improve this question
    
Duplicate of meta.stackoverflow.com/questions/25368/…, meta.stackoverflow.com/questions/23822/…, and probably others also. –  mmyers Jan 23 '10 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. –  ChaosPandion Jan 23 '10 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 Jan 23 '10 at 20:57
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
This is a workaround I can live with. –  ChaosPandion Jan 23 '10 at 20:59
add comment

see http://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.

share|improve this answer
add comment

You must log in to answer this question.

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