Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@mdit-vue/plugin-headers
Advanced tools
A markdown-it plugin to get markdown headers.
env.headers
.npm i @mdit-vue/plugin-headers
import { headersPlugin } from '@mdit-vue/plugin-headers';
import type { MarkdownItEnv } from '@mdit-vue/types';
import MarkdownIt from 'markdown-it';
const md = MarkdownIt({ html: true }).use(headersPlugin, {
// options
});
const env: MarkdownItEnv = {};
const rendered = md.render(
`\
# h1
## h2
### h3
`,
env,
);
console.log(env.headers);
Type: (str: string) => string
Details:
A function for formatting header title.
Type: number[]
Default: [2, 3]
Details:
Heading level that going to be extracted.
When using this plugin with markdown-it-anchor (recommended), this option should be a subset of markdown-it-anchor's level
option to ensure the header slugs are existed.
Type: boolean
Default: false
Details:
Should allow headers inside nested blocks or not.
If set to true
, headers inside blockquote, list, etc. would also be extracted.
Type: (str: string) => string
Default: slugify
from @mdit-vue/shared
Details:
A custom slugification function.
The default slugify function comes from @mdit-vue/shared package.
When using this plugin with markdown-it-anchor (recommended), this option will be ignored because the id
of the headings have already been determined by markdown-it-anchor's slugify
option.
FAQs
A markdown-it plugin to get markdown headers
The npm package @mdit-vue/plugin-headers receives a total of 12,302 weekly downloads. As such, @mdit-vue/plugin-headers popularity was classified as popular.
We found that @mdit-vue/plugin-headers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.