Skip to content
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

Kramdown use enable_coderay instead of use_coderay for syntax highlighting #3231

Closed
wants to merge 1 commit into from

Conversation

tonytonyjan
Copy link

By default, Jekyll set use_coderay to false while Kramdown set enable_coderay to true, so Coderay will be always enabled although use_coderay is set false.

This patch fixed the bug without losing compatibility.

ref: http://kramdown.gettalong.org/options.html

…hting.

By default, Jekyll set use_coderay to false while Kramdown set enable_coderay to true, so Coderay will be always enabled although use_coderay is set false.
%w[wrap line_numbers line_numbers_start tab_width bold_every css default_lang].each do |opt|
key = "coderay_#{opt}"
@config['kramdown'][key] = @config['kramdown']['coderay'][key] unless @config['kramdown'].key?(key)
end
else
@config['kramdown']['enable_coderay'] = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just change the if to enable_coderay?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for compatibility

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compatibility goes into Configuration – we take the input and ensure the old values have the right keys. My other question is: when did this change in Kramdown?

@parkr
Copy link
Member

parkr commented Dec 25, 2014

When did this change in Kramdown?

@parkr
Copy link
Member

parkr commented Dec 27, 2014

Thanks!

@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants