Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
markdown-it-mark
Advanced tools
The markdown-it-mark package is a plugin for the markdown-it Markdown parser that allows you to add support for the <mark> HTML tag, which is used to highlight text.
Highlight Text
This feature allows you to highlight text in your Markdown content by wrapping the text with double equal signs (==). The plugin converts this syntax into the <mark> HTML tag.
const md = require('markdown-it')().use(require('markdown-it-mark'));
const result = md.render('==highlighted text==');
console.log(result); // Outputs: <p><mark>highlighted text</mark></p>
The markdown-it-attrs package allows you to add attributes to Markdown elements. While it doesn't specifically focus on highlighting text, it provides a more general solution for adding custom attributes, including classes and IDs, to any Markdown element.
The markdown-it-container package allows you to create custom containers in your Markdown content. This can be used to create custom blocks with specific styles, including highlighted text, but requires more setup compared to markdown-it-mark.
The markdown-it-highlightjs package integrates syntax highlighting for code blocks using highlight.js. While it focuses on code syntax highlighting rather than general text highlighting, it serves a similar purpose in enhancing the readability of Markdown content.
<mark>
tag plugin for markdown-it markdown parser.
==marked==
=> <mark>inserted</mark>
Markup uses the same conditions as CommonMark emphasis.
node.js, browser:
npm install markdown-it-mark --save
bower install markdown-it-mark --save
var md = require('markdown-it')()
.use(require('markdown-it-mark'));
md.render('==marked==') // => '<p><mark>marked</mark></p>'
Differences in browser. If you load script directly into the page, without
package system, module will add itself globally as window.markdownitMark
.
FAQs
<mark> tag for markdown-it markdown parser.
The npm package markdown-it-mark receives a total of 159,522 weekly downloads. As such, markdown-it-mark popularity was classified as popular.
We found that markdown-it-mark 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.