Since RDiscount's toc generation requires the call to a separate method on the RDiscount object, I've implemented inline token replacement. You can define the token in the config file.
If you have @config['rdiscount']['toc_token'] = "[TOC]", then [TOC] in the document will be replaced with the generated table of contents. If the toc generation extension is not enabled, it will be replaced with a linebreak, which should be safe.
Added support for inline TOCs with RDiscount
Awesome! Do you think you could write a few tests for this to make sure it's working as intended?
Apparenetly, bundler can't find posix-spawn, which is required by the bundle. I guess I could manually install the other dependencies to run the tests, but I'd rather keep my gem space clean.
Any idea what's wrong with posix-spawn? gem list --remote shows it correctly.
gem list --remote
What's the specific error? Can you paste in the bundler output? What versions of Ruby and Bundler are you using?
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
*** LOCAL GEMS ***
Fetching source index for http://rubygems.org/
Could not find posix-spawn-0.3.6 in any of the sources
posix-spawn eventually installed, but now RedCloth is giving me major hell. I guess I'll have to wait a little longer.
Merge branch 'master' of https://github.com/mojombo/jekyll
Added a test case for rdiscount toc rendering.
Fixed helper inclusion in redcarpet test
Alright, this should do it. There are 3 failing test cases about pygments, but since my local pygments install is a little flaky, I didn't want to fiddle with it.
PS: Nice mustache avatar =)
Remove accidentally added doc stuff and change rakefile to prevent this.
Ignore .DS_Store files.
Update and clarify dependencies.
Gah, did not commit these for v0.11.1 version release.
Cleanup for RDiscount TOC support. Closes #333.
This pull request got messed up somehow, so I've cherry picked the relevant commits and pushed them up. Thanks so much for the patch!