title: Guessing a code block's language for correct syntax highlighting
body: <p>I'm quite puzzled how the syntax highlighting feature here on SO works, but I have seen similar somewhere else. How does this work? </p>
  
  <ul>
  <li>Is there one parser which can parse multiple languages at once? </li>
  <li>Or, are several passes of different parsers needed and the best parsing result is used? </li>
  <li>Or, is only a shallow analysis performed and the language is then guessed based on heuristics? </li>
  </ul>
  
  <p>And if one of these is true, how does it work?</p>