Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Possible Duplicate:
Code block is not properly formatted when placed immediately after a list item

I wanted to have this code in my post, and I indented things by four spaces. As you can see, it works fine here.

# had these as dependencies by default


# d3 was installed via dependencies.json
require 'd3/d3.v2'

but in my actual post (I answered a question), it looks like crap and was not rendered properly: spine.js hem server, hem build FAQ for Windows

What is going on?

share|improve this question

marked as duplicate by kiamlaluno, Toon Krijthe, jonsca, Martijn Pieters, animuson Sep 26 '12 at 12:29

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.

Because you wrote it inside bullets. – hims056 Sep 26 '12 at 6:25
Actually, @MrLister, since the goal is to help future visitors just as much as the op, and since there are N possible future visitors and only one op, it's perfectly fine, and encouraged, to answer older questions. – jmort253 Sep 26 '12 at 6:45
up vote 3 down vote accepted

You just need to use additional 4 more space (total 8 space) to write code inside bullets like this one.

Code with 4 space outside bullet.
Code with 4 space outside bullet.
  1. Example of bullet.
  2. Example of bullet.

    Code inside bullet with 8 space.
    Code inside bullet with 8 space.
  3. Example of bullet.

share|improve this answer
It would still be nice if the Ctrl-K/code block shortcut did this. Otherwise it's just a pain in the butt to add each of those 4 extra spaces manually. – Andrew Mao Sep 26 '12 at 17:27

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