New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline TOC token support for RDiscount #333

Closed
wants to merge 11 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@mkaito
Contributor

mkaito commented May 15, 2011

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.

@mojombo

This comment has been minimized.

Contributor

mojombo commented May 30, 2011

Awesome! Do you think you could write a few tests for this to make sure it's working as intended?

@mkaito

This comment has been minimized.

Contributor

mkaito commented May 31, 2011

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.

@mojombo

This comment has been minimized.

Contributor

mojombo commented Jun 1, 2011

What's the specific error? Can you paste in the bundler output? What versions of Ruby and Bundler are you using?

@mkaito

This comment has been minimized.

Contributor

mkaito commented Jun 2, 2011

ruby -v

ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

gem list bundler

*** LOCAL GEMS ***

bundler (1.1.pre.4)

cd ~/dev/jekyll && bundle install

Fetching source index for http://rubygems.org/
Could not find posix-spawn-0.3.6 in any of the sources

@mkaito

This comment has been minimized.

Contributor

mkaito commented Aug 8, 2011

posix-spawn eventually installed, but now RedCloth is giving me major hell. I guess I'll have to wait a little longer.

@mkaito

This comment has been minimized.

Contributor

mkaito commented Nov 1, 2011

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 =)

@mojombo mojombo closed this in 8a0fbf0 Apr 23, 2012

@mojombo

This comment has been minimized.

Contributor

mojombo commented Apr 23, 2012

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!

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.