neuroo/tocify — pull request #1 by titpetric (2013-09-18 12:29:35+00:00)
Title: Improvements to tocify

I made some improvements to your plugin:

- fixed some jshint errors (missing trailing semicolons, parseint radix)
- changed selector type (looking at h1, h2,... up to max depth)
- removed bootstrap icon minus (changed in BS 3.0, imho not needed, that's why you have CSS)
- proper inclusion of jQuery to avoid conflicts ($, window.jQuery)
- read id from headings to use as stub directly
- avoid selecting list elements by stub
- don't create orphaned toc lists at maximum depth

It's still compatible with markdown generated docs, and also parses sanely constructed HTML.
There's still some opportunity for cleaning the code up, but nothing major.

All the changes made should be backwards compatible, but feel free to test before merging back.