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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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)
?
There was a problem hiding this comment.
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?
@jekyllbot: merge +fix |
Backport #6247 for v3.5.x: kramdown: symbolize keys in-place
Currently-released version of Jekyll uses default_proc to assign values for the kramdown config.
Kramdown::Document#initialize
callsOptions.merge
which doesHash#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