jgm/pandoc-templates — pull request #60 by yihui (2014-05-06 07:23:06+00:00)
Title: upquote must be used after fontenc

otherwise single quotes in verbatim environments will be in trouble; see an example at http://stackoverflow.com/a/12852815/559676

Please note default.latex also has this problem. You need to move upquote after fontenc. Sorry it is a bit inconvenient for me to that change at the moment.