3

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,

0

1 Answer 1

7

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

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