
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
markdown-it-inline-wrapper
Advanced tools
There are already markdown-it plugins for adding divs or containers, but those require line breaks and that breaks how lists work in markdown. There isn't a TON of need for this specific plugin, and in most cases I'd recommend using markdown-it-span. That said, I needed this plugin to make more lists a little more semantic. I wanted to wrap the contents of a list item to work with a ::before pseudo-element in a grid layout. A span would have worked fine here, but really this should be a block level element and not an inline element.
In the future, I'd like to build this to allow you to pass the element that you'd like to use div or span.
==this is wrapped in a div== will output <div>this is wrapped in a div</div>
Markup uses the same conditions as CommonMark emphasis. Basically, that means, you can wrap divs inside of divs, but you can also use ==== to get two divs.
node.js
npm install markdown-it-inline-wrapper --save
var md = require('markdown-it')()
.use(require('markdown-it-inline-wrapper'));
md.render('==this is wrapped in a div==') // => '<p><div>this is wrapped in a div</div></p>'
OR
const markdownIt = require('markdown-it');
const markdownItInlineWrapper = require('markdown-it-inline-wrapper');
var md = markdownIt().use(markdownItInlineDiv);
md.render('==this is wrapped in a div==') // => '<p><div>this is wrapped in a div</div></p>'
Differences in browser. If you load script directly into the page, without
package system, module will add itself globally as window.markdownItInlineWrapper.
FAQs
inline wrapper () tag for markdown-it markdown parser.
We found that markdown-it-inline-wrapper 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.