Fixed it for you. And no, this is not a bug, but how Markdown works.
The key thing is to indent one level further and use a 4-space indent, so make it 8 spaces to indent. See also the Markdown syntax:
To put a code block within a list item, the code block needs to be indented twice — 8 spaces or two tabs:
* A list item with a code block: <code goes here>
More tips:
- No need to use incrementing numbers. Use
1.
for every list item. - Also no need for
<code>
or<pre>
blocks - we don't have that in Markdown as far as I know.
So, an example:
1. item text.
some text below the item but under the same item.
1. next item increments numbers automatically.
1. Here's some code:
Code block line 1
Code block line 2
1. And here's item 4.
Renders to
item text.
some text below the item but under the same item.
next item increments numbers automatically.
Here's some code:
Code block line 1 Code block line 2
And here's item 4.