Fix TOC formatting issues if headers use markup