I've had some problems trying to get my answer to have code blocks that are syntax highlighted with for different languages. The answer I'm talking about is here. The question is tagged for C# so by default everything got highlighted as C# (which makes sense). But part of my answer involved some Visual Basic code. I tried putting
<!-- language: vb --> and
<!-- language: lang-vb --> but neither of those worked. In the preview, the code was still highlighted as C#. I was thinking maybe the tags overrule what I specified.
Not wanting to give up so easily, I then tried
<!-- language-all: vb --> which ended up working! The preview showed the C# code highlighted as C# and the one VB code block highlighted as VB. I posted my answer but then noticed that the 'real' (non-preview) view of the answer, had everything highlighted as C#!
I didn't want to keep fiddling with my question so I'm fine to leave it as is with the weird formatting for one code block, but it seems like we should be able to mix languages like this? At the least, it would be nice if the preview matches what actually ended up getting posted. Even now, I can go back and edit the question and then it looks fine in the preview.