Skip to content

Instantly share code, notes, and snippets.

View jdcasey's full-sized avatar

John Casey jdcasey

View GitHub Profile
#!/usr/bin/env ruby
# encoding: utf-8
=begin
github_toc v0.1.0
Brett Terpstra 2014
Creates a linked table of contents from headers in a GitHub readme
Place a [toc] marker in the file to have it automatically replaced with the TOC
If there's no marker, it dumps just the TOC to STDOUT