Assign id to hn instead of section
refactor toc generation