Skip to content

feat: added a wrapHeadingTextInAnchor option#28

Merged
medfreeman merged 1 commit intomedfreeman:masterfrom
jsepia:jsepia-wrapheading
Dec 23, 2018
Merged

feat: added a wrapHeadingTextInAnchor option#28
medfreeman merged 1 commit intomedfreeman:masterfrom
jsepia:jsepia-wrapheading

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.

2 participants