There needs to be a blank line before the code block. That is likely what is causing it not to highlight properly.