jgallen23/toc — pull request #30 by wheresrhys (2013-10-28 10:37:41+00:00)
Title: Verbose ids

Added the ability to use verbose ids (generated from heading text) with a mechanism for avoiding duplicate ids.

The default anchorName function is now stored outside of default options to enable easier over-riding and is referenced with the keyword 'short'. Verbose is turned on by using the keyword 'verbose' and custom anchorName functions can still be added to the options as before so this change should be compatible with previous versions.

I've written two tests - one to test the verbose ids function and one to test that the anchorName function can still be specified manually. The second of these I've commented out as it breaks (but this is more down to my lack of familiarity with mocha than the functionality itself being broken)