I can't find where this was discussed previously but I believe you need to have the bbcode extension enabled in order for code blocks to have syntax highlighting.
If you only have the Markdown extension enabled, Markdown code blocks won't be highlighted. But if bbcode is enabled, both bbcode and Markdown blocks will be highlighted.
That's because both re-use the same rendering template and only bbcode contains the highlight javascript code.
By default highlight.js uses automatic language detection but you can specify a language in both markdown and bbcode code blocks.