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: symbolize keys in-place #6247

Merged
merged 4 commits into from Jul 28, 2017

Conversation

@parkr
Copy link
Member

parkr commented Jul 26, 2017

Currently-released version of Jekyll uses default_proc to assign values for the kramdown config. Kramdown::Document#initialize calls Options.merge which does Hash#each over our hash which doesn't have symbolized keys. To fix this, we need to add the symbolized keys into the hash itself.

Fixes #5980.

/cc @jekyll/stability

parkr added 2 commits Jul 26, 2017
@jekyllbot jekyllbot assigned jekyllbot and ghost Jul 26, 2017
@parkr parkr added the fix label Jul 26, 2017
@parkr parkr assigned pathawks and unassigned jekyllbot Jul 26, 2017
@parkr parkr requested review from pathawks and Jul 26, 2017
@ghost
ghost approved these changes Jul 27, 2017
Copy link
Member

SuriyaaKudoIsc left a comment

👌

Copy link
Member

pathawks left a comment

LGTM 👍

Hash
)
hash.keys.each do |key|
hash[key.to_sym] = hash[key]

This comment has been minimized.

Copy link
@pathawks

pathawks Jul 28, 2017

Member
hash[key.to_sym] = hash[key] unless key.is_a?(Symbol)

?

This comment has been minimized.

Copy link
@parkr

parkr Jul 28, 2017

Author Member

It should be a no-op since Symbol#to_sym returns self, right?

@parkr

This comment has been minimized.

Copy link
Member Author

parkr commented Jul 28, 2017

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit 143367c into master Jul 28, 2017
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jekyllbot jekyllbot deleted the kramdown-configs branch Jul 28, 2017
jekyllbot added a commit that referenced this pull request Jul 28, 2017
@parkr parkr mentioned this pull request Aug 12, 2017
6 of 6 tasks complete
parkr added a commit that referenced this pull request Aug 12, 2017
parkr added a commit that referenced this pull request Aug 12, 2017
Backport #6247 for v3.5.x: kramdown: symbolize keys in-place
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.