Skip to content

kramdown: symbolize keys in-place#6247

Merged
jekyllbot merged 4 commits into
masterfrom
kramdown-configs
Jul 28, 2017
Merged

kramdown: symbolize keys in-place#6247
jekyllbot merged 4 commits into
masterfrom
kramdown-configs

Conversation

@parkr

@parkr parkr commented Jul 26, 2017

Copy link
Copy Markdown
Member

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

@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 a user and pathawks July 26, 2017 22:38

@suriyaa suriyaa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👌

@pathawks pathawks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

@parkr

parkr commented Jul 28, 2017

Copy link
Copy Markdown
Member Author

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit 143367c into master Jul 28, 2017
@jekyllbot jekyllbot deleted the kramdown-configs branch July 28, 2017 16:05
jekyllbot added a commit that referenced this pull request Jul 28, 2017
@parkr parkr mentioned this pull request Aug 12, 2017
6 tasks
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
@jekyll jekyll locked and limited conversation to collaborators Jan 24, 2020
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.

kramdown GFM is not enable?

5 participants