fixed heading parsing so as not to interfere with horizontal rule