- The problem
The TOC is generated first and then sub headings are inserted.
If existing article already has headings then those will no appear inside the TOC.
- Simple solution
Parse the article and create a TOC on demand.
If existing article already has headings then those will no appear inside the TOC.