Fix bug in toc plugin

Solved thanks to https://github.com/vmg/redcarpet/issues/158
Merge branch 'master' into gh-pages