Generate table of contents from html headings.