Code block is not properly formatted when placed immediately after a list item
In this post about nesting code-blocks in lists, it is explained that if you want to nest a code-block in a list, you need to indent your code 8 spaces. This will allow you to include the code block as part of a list item. Is there any way to place code blocks after lists without having them use the same indentation level as the list that came before it?
The only solution I've found is to place a single character somewhere between the list item and the code block so it "switches off" the list formatting mode. Something like this:
1. list item 1 2. list item 2 . string myVariable = "hello world"
Which will output like this:
- list item 1
- list item 2
string myVariable = "hello world"
Without the period I'd have to indent my code 8 spaces, which would put the code block at the same level as the list item. This isn't a major problem, but I was just wondering if there was a better way to get Markdown to do what I want it to.
Is there any way to force the "list item" formatting mode to switch off. It seems like the "list mode" will stay enabled until a line is reached that starts with a character other than a space.