Domanda

I am trying to create a nested list after an equation in a markdown document in MarkdownPad but instead I am getting a code block. I am unsure how to escape it in order to get nested list (2nd order instead):

Here is the code:

  • 1st order list:
    • 2nd order list:

Some other text here which should be followed by a 2nd order nested list:

- 4 spaces followed by a "-" gives a code block instead of a second order list
È stato utile?

Soluzione

Short version: you can't.

Since you have inserted a new paragraph (Some other text here which should be followed by a 2nd order nested list:), you have closed the list block. You can't jump straight to a sub-list[^1] without first having an enclosing list[^2].

If, however the some other text is supposed to be an aside regarding the first 2nd order item (and so the following 2nd order item is actually the 2nd 2nd order item of the list), then you can achieve it by not breaking the outer 1st order list:

 - 1st item
     - 2nd item

    other text    
     - also 2nd item

[^1]: i.e. a nested list.

[^2]: This may not be true for all markdown engines, but is the case for the engine used by MarkdownPad. As a side point, the base markdown spec doesn't define a syntax for nested lists.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top