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

Configure kramdown toc_levels as array by default #8015

Merged
merged 1 commit into from Feb 20, 2020

Conversation

ashmaroli
Copy link
Member

Summary

When kramdown is given the option toc_levels as a string range ("1..6"), kramdown parses the string into an Array but in the process, generates intermediate objects of Range, MatchData and Array.
Since this process repeats for every kramdown document converted by kramdown, Jekyll can help reduce the work done by passing an Array by default.

This is a backwards-compatible change.

@ashmaroli ashmaroli added the micro-optimization Matters only if it is a very large site ¯\_(ツ)_/¯ label Feb 20, 2020
@mattr-
Copy link
Member

mattr- commented Feb 20, 2020

@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 707741c into jekyll:master Feb 20, 2020
jekyllbot added a commit that referenced this pull request Feb 20, 2020
@ashmaroli ashmaroli deleted the kramdown-toc-levels branch February 20, 2020 18:01
@jekyll jekyll locked and limited conversation to collaborators Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fix frozen-due-to-age internal micro-optimization Matters only if it is a very large site ¯\_(ツ)_/¯
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants