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.

This question already has an answer here:

I need to write a nested code block on a sub element of a list.

My list look like

1. element 1
1. element 2
1. element 3, this has subelements
    1. sub element 1
    1. sub element 2 this one has a code block
    ```
    #!Shell

    line of code 1
    line of code 2
    line of code 3
    ```
    1. sub element 3
1. element 4

but it does not work... How can I make this happen?

thanks,

share|improve this question

marked as duplicate by ben is uǝq backwards, animuson, Mat, Flexo Mar 23 '13 at 16:34

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

You simply need to indent those code lines a bit (8 spaces) more:


  1. element 1
  2. element 2

    // code here, 8 spaces
    
  3. element 3, this has subelements

    1. sub element 1
    2. sub element 2 this one has a code block

      #!Shell, 12 spaces
      
      line of code 1
      line of code 2
      line of code 3
      
      1. And four more for here:

        # a whole bunch of spaces
        
    3. sub element 3

  4. element 4

share|improve this answer

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