jgallen23 / toc

Table of Contents Plugin
http://projects.jga.me/toc/
MIT License
531 stars 111 forks source link

Verbose ids #30

Closed wheresrhys closed 10 years ago

wheresrhys commented 10 years ago

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)

wheresrhys commented 10 years ago

I don't want to be rude, but I did ask in advance of working on this pull request if it was a feature you'd be interested in so I didn't end up wasting my time... and no response after 11 days makes it feel a bit like I did waste my time.

Is there some problem with the implementation you'd like me to address?

jgallen23 commented 10 years ago

No, I just haven't had a chance to look at it. Also, it looks like it will not merge cleanly, so I have to manually merge it.

wheresrhys commented 10 years ago

I can try and pull again from master and merge myself if it'd help

jgallen23 commented 10 years ago

yeah, that would help. Thanks

wheresrhys commented 10 years ago

That should hopefully be done for you now

jgallen23 commented 10 years ago

this will be in the next release. thanks!