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

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");

share|improve this question

marked as duplicate by random, Jeff Atwood Nov 17 '09 at 10:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 4 down vote accepted

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");
    
share|improve this answer

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