
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
@toycode/markdown-it-class
Advanced tools
This is a plugin for the markdown-it markdown parser. This plugin add class attributes to html elements.
npm install @toycode/markdown-it-class --save-dev
Although it will work with "yarn", I have not tried it.
const MarkdownIt = require('markdown-it')
const markdownItClass = require('@toycode/markdown-it-class')
const mdText = '# Hello'
const mapping = { h1: 'title' }
const md = MarkdownIt().use(markdownItClass, mapping)
console.log(md.render(mdText))
// <h1 class="title">Hello</h1>
const MarkdownIt = require('markdown-it')
const markdownItClass = require('@toycode/markdown-it-class')
const mdText = '# Hello\n## *Markdown* world'
const mapping = { h1: ['title', 'is-4'], h2: 'subtitle', em: 'tag' }
const md = MarkdownIt().use(markdownItClass, mapping)
console.log(md.render(mdText))
// <h1 class="title is-4">Hello</h1>
// <h2 class="subtitle"><em class="tag">Markdown</em> world</h2>
FAQs
A markdown-it plugin that add classes by tag name
The npm package @toycode/markdown-it-class receives a total of 5,512 weekly downloads. As such, @toycode/markdown-it-class popularity was classified as popular.
We found that @toycode/markdown-it-class 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.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.