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: added a wrapHeadingTextInAnchor option #28

Merged
merged 1 commit into from
Dec 23, 2018

Conversation

jsepia
Copy link
Contributor

@jsepia jsepia commented Oct 6, 2016

When true, it bypasses anchorLinkSymbol and instead wraps the anchor link around the heading text:

require('markdown-it')()
  .use(require('markdown-it-toc-and-anchor'), { wrapHeadingTextInAnchor: true })
  .render(`# Heading`)
<h1 id="heading"><a class="markdownIt-Anchor" href="#heading">Heading</a></h1>

I needed this for my site and I figured it wouldn't hurt to merge this feature in.

@medfreeman medfreeman merged commit 8419f86 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