Fix bug in toc plugin

Solved thanks to https://github.com/vmg/redcarpet/issues/158