Here's a simple block:

foo

This should be a code block, though:

  <div>
    foo
</div>

As should this:

  <div>foo</div>

Now, nested:

foo

This should just be an HTML comment:

Multiline:

Code block:

  <!-- Comment -->

Just plain comment, with trailing spaces on the line:

Code:

  <hr />

Hr's: