Skip to content

feat: add anchorLinkPrefix option#27

Merged
medfreeman merged 1 commit intomedfreeman:masterfrom
ruanyf:master
Dec 23, 2018
Merged

feat: add anchorLinkPrefix option#27
medfreeman merged 1 commit intomedfreeman:masterfrom
ruanyf:master

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.

2 participants