Skip to content

Conversation

estan
Copy link

@estan estan commented Dec 21, 2016

The start_level will be added to the level of all headings.

This is useful if the markdown rendering is done in some context where the content to be generated is already at some level.

@estan estan force-pushed the start-level-option branch from 328ccd3 to 711a809 Compare December 21, 2016 08:59
By default markdown will turn Header 1 and Header 2 into `h1` and `h2`
elements, respectively. The `start_level` option specifies an offset that
will be added to the levels. For example, with a `start_level` of 2,
Header 1 would result in a `h3` element and Header 2 in a `h5` element.
Copy link
Collaborator

Choose a reason for hiding this comment

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

You probably mean h3 and h4 (not h3 and h5).

Copy link
Author

Choose a reason for hiding this comment

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

Bah, indeed. Good catch. Will fix.

Copy link
Author

Choose a reason for hiding this comment

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

Pushed fixed commit.

The `start_level` will be added to the level of all headings. This is
useful if the markdown rendering is done in some context where the
content to be generated is already at some level.
@estan estan force-pushed the start-level-option branch from 711a809 to ddd09db Compare December 21, 2016 18:15
@waylan
Copy link
Member

waylan commented Dec 22, 2016

Thanks for the submission, however, this should be implemented as an extension. In fact, it is already part of the TOC extension (as well as the deprecated HeaderID extension). Note that in the upcoming version 3.0, all keywords will be removed and the only way to alter the parser's behavior will be via extensions. That being the case, I see no need to do this. if you really want this behavior outside of the existing extensions, then I would suggest implementing your own third-party extension.

@waylan waylan closed this Dec 22, 2016
@estan
Copy link
Author

estan commented Dec 23, 2016

Aha, I see. I didn't know options were being removed. I'll try to make my own extension then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants