
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
markdown-it-attr-link-replacer
Advanced tools
markdown-it plugin for replacing links (image & text) in the markdown document.
This is a fork of Martin Heidegger's markdown-it-replace-link plugin.
However, I needed it for Ditto website with some more customizations that are probably too heavy for a lot of users of the original library.
a
and img
tagsmarkdown-it plugin for replacing links (image & text) in the markdown document.
npm install markdown-it-attr-link-replacer -S
var md = require('markdown-it')({
html: true
}).use(require('markdown-it-attr-link-replacer'), {
attributes: ['src', 'href']
replaceLink: function (link, env) {
return link + "?c=" + Date.now();
}
}); // <-- this use(package_name) is required
[Hello](test)
and use this
var md = require('markdown-it')({
html: true
}).use(require('markdown-it-attr-link-replacer'), {
replaceLink: function (link, env) {
return "http://me.com/" + link;
}
});
This will result in the link prefixed with the http://me.com/
like:
<p><a href="http://me.com/test">Hello</a></p>
Both images and html links will be processed by default
To run the tests use:
npm run test
FAQs
markdown-it plugin for replacing links (image & text) in the markdown document.
We found that markdown-it-attr-link-replacer 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
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.