allow leading and trailing spaces before a header when parsing out mini-toc