Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
markdown-it-toc-and-anchor-fork
Advanced tools
markdown-it plugin to add toc and anchor links in headings
markdown-it plugin to add toc and anchor links in headings
$ npm install markdown-it-toc-and-anchor
import markdownIt from "markdown-it"
import markdownItTocAndAnchor from "markdown-it-toc-and-anchor"
markdownIt({
html: true,
linkify: true,
typography: true,
})
.use(markdownItTocAndAnchor, {
// ...options
})
.render(md)
toc
(default: true
)
Allow you to enable/disable the toc transformation of @[toc]
tocClassName
(default: "markdownIt-TOC"
)
Option to customize html class of the <ul>
wrapping the toc
tocFirstLevel
(default: 1
)
Allow you to skip some heading level. Example: use 2 if you want to skip <h1>
from the TOC.
anchorLink
(default: true
)
Allow you to enable/disable the anchor link in the headings
anchorLinkSymbol
(default: "#"
)
Allow you to customize the anchor link symbol
anchorLinkSpace
(default: true
)
Allow you to enable/disable inserting a space between the anchor link and heading.
anchorLinkSymbolClassName
(default: null
)
Allow you to customize the anchor link symbol class name. If not null, symbol will be rendered as <span class="anchorLinkSymbolClassName">anchorLinkSymbol</span>
.
anchorLinkBefore
(default: true
)
Allow you to prepend/append the anchor link in the headings
anchorClassName
(default: "markdownIt-Anchor"
)
Allow you to customize the anchor link class
resetIds
(default: true
)
Allow you to reset (or not) ids incrementation. Use it if you will have multiple documents on the same page.
indentation
(default: " "
)
Allow you to customize indentation
$ npm test
).FAQs
markdown-it plugin to add toc and anchor links in headings
The npm package markdown-it-toc-and-anchor-fork receives a total of 2 weekly downloads. As such, markdown-it-toc-and-anchor-fork popularity was classified as not popular.
We found that markdown-it-toc-and-anchor-fork demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.