Jekyll and escape sequences can be strange. With Github Flavored Markdown, it is possible to set syntax highlighting in fenced code blocks like so:

1
2
3
```haskell
putStrln "Hello World!"
```

But what about code blocks that are made up using four initial spaces on each line? Like so: <pre> print "bar" </pre>. The only option is to add {% highlight haskell %} and {% endhighlight %}` after:

    print "bar

Blocks of code are either fenced by lines with three back-ticks ```, or are indented with four spaces. I recommend only using the fenced code blocks – they’re easier and only they support syntax highlighting. – Markdown Cheatsheet

You can check out the source code of this blog post also.

Sidenote: Make sure to keep your post in UTF-8 format or Jekyll might spaz out.

References