
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
remark-autolink-headings
Advanced tools
Automatically add links to headings in Markdown.
With npm do:
npm install remark-autolink-headings --save
remark-autolink-headings is designed to work with remark-html & remark-slug, and creates GitHub style links for each of your headings:
var remark = require('remark');
var html = require('remark-html');
var slug = require('remark-slug');
var headings = require('remark-autolink-headings');
var markdown = '# Hello';
var result = remark().use([ slug, headings, html ]).process(markdown);
console.log(result);
//=> <h1 id="hello"><a href="#hello" aria-hidden="true"><span class="icon icon-link"></span></a>Hello</h1>
Note that this module must be included after remark-slug.
Type: object
By default, when using the append
or prepend
behaviour, this will add
aria-hidden="false"
to the anchor. When using the wrap
behaviour, this is
left empty for you to add any extra HTML attributes.
Type: string
Default: prepend
Set this to prepend
to inject the link before the heading text; append
after
it, and wrap
to wrap the whole heading text with the link. Note that the
wrap
option doesn't apply any value set by the template
option.
Type: string
Default: <span class="icon icon-link"></span>
The template used by the append
& prepend
behaviours.
Pull requests are welcome. If you add functionality, then please add unit tests to cover it.
MIT © Ben Briggs
FAQs
Deprecated: this package is no longer maintained. Please use `remark-rehype` to move from remark (markdown) to rehype (HTML) and then replace `remark-autolink-headings` with [`rehype-autolink-headings`][rehype-autolink-headings].
We found that remark-autolink-headings demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.