Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Present certain TOC rendering options to the user through Atom config #469

Merged
merged 4 commits into from
Oct 7, 2019

Conversation

tanhevg
Copy link
Contributor

@tanhevg tanhevg commented Oct 3, 2019

@tanhevg tanhevg changed the title Process certain options of markdown-it-table-of-contents from config Present certain TOC rendering options to the user through Atom config Oct 4, 2019
const _includeLevels = []
for (let _i = 1; _i <= initState.tocDepth; _i++) {
_includeLevels.push(_i)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks somewhat ugly. Can't we shorten it? F.ex.

// snip
// array [1, 2, …, initState.tocDepth]
includeLevel: Array.from({length: initState.tocDepth}, (x, i) => i+1)
// snip

@lierdakil
Copy link
Collaborator

Thanks for submitting a pull request! I have a minor nitpick about the code style, it'd be great if you could fix that. If you don't have time to do that, no worries, I can do that myself, but that'll probably take a few days, since I'm short on spare time myself at the moment.

@tanhevg
Copy link
Contributor Author

tanhevg commented Oct 6, 2019

Fixed. No worries, JavaScript/TypeScript is not my first language atm, so any style tips are appreciated.

@lierdakil lierdakil merged commit b5e4189 into atom-community:master Oct 7, 2019
@lierdakil
Copy link
Collaborator

Thanks! Released as v3.11.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants