jshint / jshint.github.io

The homepage for JSHint
http://jshint.com
20 stars 19 forks source link

Marked: Add anchors to headings - jshint/jshint#2938 #40

Open originalfoo opened 8 years ago

originalfoo commented 8 years ago

Custom renderer for heading tags will add anchors to all headings in rendered markdown content. Anchors are slug-like representations of the heading text, same format as GFM.

Code from https://github.com/chjj/marked#overriding-renderer-methods (MIT license)

Might need some CSS tweaks but just wanted to see if the code change was acceptable first.