Move lua TOC extraction to function
Accept either 'name' or 'id' in tags when building search index
Move withTmpDir to utils.lua
Extract testing diff code to a reusable function
Add tests for markdown ToC extraction
Add support for extracting table of contents from markdown headings
Fix missing withTmpDir function