Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
remark-slug
Advanced tools
Package description
The remark-slug npm package is a plugin for the remark Markdown processor that automatically adds slugs to headings in a Markdown document. This is useful for generating links to specific sections of the document, enhancing navigation and accessibility.
Automatic Slug Generation
This feature automatically generates slugs for each heading in a Markdown document. The code sample shows how to use remark-slug with remark and remark-html to convert a Markdown heading into HTML with a slug.
const remark = require('remark');
const remarkHtml = require('remark-html');
const remarkSlug = require('remark-slug');
remark()
.use(remarkSlug)
.use(remarkHtml)
.process('# Hello world', function (err, file) {
console.log(String(file));
});
markdown-it-anchor is a plugin for the markdown-it Markdown parser. Similar to remark-slug, it adds anchors to headings in Markdown documents. While remark-slug is specifically designed for the remark ecosystem, markdown-it-anchor serves the markdown-it ecosystem, offering similar functionality but within a different processing environment.
rehype-slug is a plugin for the rehype processor, which is part of the unified.js ecosystem, similar to remark. It adds slugs to HTML elements processed through rehype. This is akin to what remark-slug does but is applied directly to HTML rather than Markdown, making it suitable for projects that work with HTML content at a later stage in the content pipeline.
Readme
Stability: Legacy.
This package is no longer recommended for use.
It’s still covered by semantic-versioning guarantees and not yet deprecated,
but use of this package should be avoided.
Please use remark-rehype
to move from remark (markdown) to rehype (HTML)
and then replace remark-slug
with
rehype-slug
.
Legacy documentation for this package is still available in Git.
FAQs
Legacy remark plugin to add anchors to headings — please use `rehype-slug`
The npm package remark-slug receives a total of 2,993,616 weekly downloads. As such, remark-slug popularity was classified as popular.
We found that remark-slug demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.