
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
markdown-it-replace-link
Advanced tools
markdown-it plugin for replacing links (image & text) in the markdown document.
markdown-it plugin for replacing links (image & text) in the markdown document.
var md = require('markdown-it')({
html: true,
linkify: true
})
.use(require('markdown-it-replace-link'), {
processHTML: true, // defaults to false for backwards compatibility
replaceLink: function (link, env, token, htmlToken) {
return link + "?c=" + Date.now();
}
})
[Hello](test)
and use this
var md = require('markdown-it')({
replaceLink: function (link, env, token, htmlToken) {
return "http://me.com/" + link;
}
}).use(require('markdown-it-replace-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.
If using this in a browser, the script will create a variable
window.markdownitReplaceLink
that can be passed to .use()
.
To run the tests use:
npm run test
FAQs
markdown-it plugin for replacing links (image & text) in the markdown document.
The npm package markdown-it-replace-link receives a total of 3,988 weekly downloads. As such, markdown-it-replace-link popularity was classified as popular.
We found that markdown-it-replace-link 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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.