
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
markdown-it-replacements
Advanced tools
This markdown-it plugin replaces the "replacements" feature in markdown-it typographer, allowing you to customize the replacement rules (regular expression substitutions) done to inline text outside of autolinks.
There are four built-in replacement rules (mimicking some of the built-in markdown-it typographer):
+- → ± (rule "plusminus")... → … (rule "ellipsis")--- → — (rule "mdash")-- → – (rule "ndash")Each rule can be turned off by specifying an option object when using the
module (mapping each undesired rule name to false).
Additional rules can be added by modifying the replacements module attribute
(an array of rules, where each rule has a name rule.name,
regular expression rule.re, substitution rule.sub, and boolean
default on/off rule.default).
// Without smart quotes
md = require('markdown-it')()
.use(require('markdown-it-replacements'));
md.renderInline('Hello... "world"---');
// -> 'Hello… "world"—'
// With smart quotes
md = require('markdown-it')({typographer: true})
.use(require('markdown-it-replacements'));
md.renderInline('Hello... "world"---');
// -> 'Hello… “world”—'
// Using options to turn specific replacements on/off
md = require('markdown-it')({typographer: true})
.use(require('markdown-it-replacements'), {mdash: false});
md.renderInline('Hello... "world"---');
// -> 'Hello… “world”---'
// Adding custom replacements
mir = require('markdown-it-replacements');
mir.replacements.push({
name: 'allcaps',
re: /[a-z]/g,
sub: function (s) { return s.toUpperCase(); },
default: true
});
md = require('markdown-it')({typographer: true}).use(mir);
md.renderInline('Hello... "world"---');
// -> 'HELLO… “WORLD”—'
typographer option to be set to true. (The reasoning being
that, if you're using this module, you probably want to do the
substitutions.) This means that the typographer option effectively
controls whether to do smart-quote substitution.FAQs
Customize replacements in markdown-it typographer
The npm package markdown-it-replacements receives a total of 334 weekly downloads. As such, markdown-it-replacements popularity was classified as not popular.
We found that markdown-it-replacements 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.