4

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.

# Spine.app had these as dependencies by default
require('json2ify')
require('es5-shimify')
require('jqueryify')

require('spine')
require('spine/lib/local')
require('spine/lib/ajax')
require('spine/lib/manager')
require('spine/lib/route')

# 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?

3
  • Because you wrote it inside bullets.
    – Himanshu
    Commented Sep 26, 2012 at 6:25
  • 1
    meta.stackexchange.com/questions/3327/…
    – Mysticial
    Commented Sep 26, 2012 at 6:29
  • 1
    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
    Commented Sep 26, 2012 at 6:45

1 Answer 1

4

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.

1
  • 1
    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
    Commented Sep 26, 2012 at 17:27

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