This happens because Markdown treats such syntax as an ordered list:
Ordered lists use numbers followed by periods:
It’s important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:
Syntax highlighting is provided, when available (not all sites are enabled), by google-code-prettify, and is thus limited to the languages handled by this highlighter. I bumped into the problem myself recently when writing up a Fortran 95 code question on another SE. If you add the necessary code to do this highlighting to prettify, then the chances are that ...