2

Possible Duplicate:
How do I include a code block right after a list without it turning into a blockquote?

How do I create a list with code blocks in between? Example:

  1. print in ruby

    puts "ruby"

  2. print in Java

    System.out.println("Java");

4

If you just want short bits of code you can use backticks.

  1. print in ruby

    puts "ruby"

  2. print in Java

    System.out.println("Java");

Or, indent 8 spaces per the Markdown help.

  1. print in ruby

    puts "ruby"
    
  2. print in Java

    System.out.println("Java");
    

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