See here:

• Item one
• Item Two

# this is supposed to be a code comment

import bpy print(bpy.context.scene.name)

1. this should not be indented I guess

1. Item one
2. Item Two

(add something here to fix code block interpretation)

import bpy
print(bpy.context.scene.name)


Am I overlooking something obvious in post formatting?

A quick and simple fix is to do as you've done and put a string of text there. A comment <!-- --> should do the job if you need to keep the post clean.
# this is supposed to be a code comment