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

feat: add anchorLinkPrefix option #27

Merged
merged 1 commit into from
Dec 23, 2018
Merged

Conversation

ruanyf
Copy link
Contributor

@ruanyf ruanyf commented Sep 29, 2016

Allows you to add a prefix to the generated header ids, e.g. section-.

markdownIt().use(markdownItTocAndAnchor, {
  anchorLinkPrefix: 'section-'
}).render('# hello world')

//  <h1 id="section-hello-world">
//    <a class="markdownIt-Anchor" href="#section-hello-world">#</a>
//     hello world
//  </h1>'

@medfreeman medfreeman merged commit 3f35d5a into medfreeman:master Dec 23, 2018
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.

None yet

2 participants