Code block is not properly formatted when placed immediately after a list item
As part of this answer on SO I entered a code block. The code however was not being displayed in the markup, it was just plain text with no line breaks. I tried multiple times copying and pasting it in, entering tabs/spaces for the indents and highlighting it and clicking the 'Code Sample' button.
Here is an example of the failure case...
Here is a list item. The code direclty after is not formatted correctly.
import java.text.SimpleDateFormat import java.text.DateFormat
Date timeDate1 = new Date().parse("dd-MM-yyyy HH:mm:ss Z","18-05-2012 09:29:41 +0800") Date timeDate2 = new Date().parse("dd-MM-yyyy HH:mm:ss Z","18-05-2012 09:29:21 +0900")
After further testing it seems that if you enter source code directly after a list then the code will not be formatted correctly.
How do correctly display code blocks after a bullet list?