Skip to content
PluginStats

prettier-plugin-markdown-replacements weekly downloads statistics

By cudoment (2 listings) · npm · Prettier plugins

Prettier plugin that applies configured text replacements to Markdown/MDX prose, leaving code spans, code blocks and MDX comments untouched.

View on npm Fresh · Oct 17, 2026

prettier-plugin-markdown-replacements has 8 recorded weekly downloads on npm, a decrease of 42.9% over the past 30 days.

It ranks #1949 of 2,251 tracked npm listings by weekly downloads.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
8
Official API · Oct 17, 2026
7-day growth
+60.0%
+3 weekly downloads
30-day growth
-42.9%
-6 weekly downloads
90-day growth
—
Insufficient history
Rank
#1949
Among tracked npm listings

About prettier-plugin-markdown-replacements

prettier-plugin-markdown-replacements

English | 한국어

A Prettier plugin that applies the text replacements you register to Markdown and MDX documents, and leaves code spans, code blocks and MDX comments exactly as written.

Register the spellings you keep getting wrong, or the notation your project has settled on, and they are corrected every time a document is formatted.

Contents

• Requirements • Installation • Configuration • Rule formats • Why replacements run in the formatter • What is protected • Writing rules that span whitespace • Recipes • Using it with other plugins • Options • Compatibility • Development • License

Requirements

| Item | Version |

| Node.js | 18 or later | | Prettier | 3.5.3 or later |

Installation

Install it as a dev dependency alongside Prettier.

The package is an ES module, so name it in plugins rather than loading it with require(). Prettier 3's plugin loader handles ES modules directly, from any configuration file format.

Configuration

Add the package to plugins and list your rules. The default is empty, so nothing is replaced until you add one.

Before

After

Prose in the body, in headings, in lists and in table cells is corrected, while anything wrapped in code markup keeps its original spelling.

Rule formats

| Format | Example | Behavior |

| Literal | Javascript=>JavaScript | Compared as a plain string and replaced at every occurrence | | Regular expression | /Max ([0-9]+)/g=>Maximum: $1 | Written as /pattern/flags, with capture references such as $1 available |

With the regular expression above, Max 50 becomes Maximum: 50. The g flag is added automatically when omitted, so every occurrence is replaced.

• The separator is the first => in a literal rule, and the => after the flags in a regular expression rule. The replacement itself may contain =>. • Nothing is trimmed, so leading and trailing spaces are part of the rule. • Rules are applied in array order, and the output of one rule is the input of the next. • An entry without a separator or with an empty left side is ignored while the remaining rules still run. • An entry that starts with / but does not read as a regular expression rule, because the pattern is invalid or a flag is unknown, is treated as a literal rule. That keeps a path rewrite such as /docs/guide=>/docs/tutorial working, and it also means a mistyped regular expression matches nothing rather than failing loudly. • The flags are the ones the running JavaScript engine accepts. The v flag needs Node.js 20 or later; on Node.js 18 a rule that uses it is read as a literal rule. • In a JSON configuration file every backslash in the pattern is written twice, because JSON uses the backslash as an escape character itself. The rule //gi=> is stored as "//gi=> ".

Why replacements run in the formatter

Prettier decides how a document is printed and does not change what it says. A replacement changes the content, so putting one in a Prettier plugin is a deliberate choice rather than an oversight, and it is worth saying why.

Formatting is the one step that already runs on every document, in the editor on each save and in CI on each commit. A separate rewriting pass would need its own invocation, its own file discovery and its own ignore rules, and a spelling that slipped past it would sit in the repository until somebody noticed. Registering the rule here means the notation a project has settled on is applied at the moment the document is formatted, so a formatted document is a corrected one.

The rest of this page follows from that choice. A rule sees the whole source at once, which is why one that reaches across a line break rewrites the document's structure, and why the regions that have to survive verbatim are lifted out before any rule runs. When a rule turns out to be broad enough to be destructive, the plugin leaves the document exactly as it was.

What is protected

Replacements run on the document source before it is parsed, and these regions are lifted out first and put back untouched.

| Region | Example |

| Inline code | ` Javascript ` | | Fenced code blocks | and `` | | Indented code blocks | a block indented by four spaces or by a tab | | MDX comments | {/* ... */} |

A string that must survive verbatim, such as a value an API really returns, is protected by wrapping it in code markup.

A fence is recognized at any nesting depth, including inside a list item, whether a blank line precedes it or it sits right under the list marker. An indented code block is recognized at the top level only: inside a list item or a blockquote, four spaces mean ordinary content rather than code, and the plugin tracks no container nesting, so it leaves those alone rather than risk treating list content as code and silently skipping replacements there. Fence the code that is nested in another block. An unclosed fence protects the rest of the document, which is how CommonMark reads it and how Prettier prints it. A fence whose info string names a Markdown language, such as md, is formatted by Prettier as an embedded document through this same parser; the rules stay out of it all the same.

There is one safeguard on top of that. A pattern broad enough to match the internal tokens used to protect those regions would leak a token into the document, so when that happens the document is left exactly as it was. A rule such as /[A-Za-z_]+/g=>X therefore does nothing rather than something destructive.

Writing rules that span whitespace

Replacements see the whole document at once, not one paragraph at a time, and in Markdown a line break carries structure. A pattern that reaches across one is a structural edit, not a spelling fix. Two failures show up quickly.

| Pattern | What it breaks |…

Description from the npm listing.

  • prettier
  • prettier-plugin
  • markdown
  • mdx
  • replace
  • typo

Where prettier-plugin-markdown-replacements sits in the listing

Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

All npm2,248 listings · 113 pages · page 98, #10 (overall #1950)
All npm: every listing in weekly downloads order
PNG SVG
Prettier plugins241 listings · 13 pages · page 6, #9 (overall #109)
Prettier plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

prettier-plugin-markdown-replacements weekly downloads on npm, last 90 days: 8 weekly downloads as of Oct 17, 2026.prettier-plugin-markdown-replacementsWeekly downloads on npm · Last 90 days8downloads / week0102030405060Jul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
prettier-plugin-markdown-replacements weekly downloads on npm, last 90 days: 8 weekly downloads as of Oct 17, 2026.
PNG SVG

7/30/90-day growth

prettier-plugin-markdown-replacements weekly downloads growth on npm: +60.0% over 7 days, -42.9% over 30 days, 90-day growth unavailable.prettier-plugin-markdown-replacementsWeekly downloads growth on npm8downloads / week now7-day growth+3 weekly downloads+60.0%30-day growth-6 weekly downloads-42.9%90-day growth+8 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
prettier-plugin-markdown-replacements weekly downloads growth on npm: +60.0% over 7 days, -42.9% over 30 days, 90-day growth unavailable.
PNG SVG

Ranking history

prettier-plugin-markdown-replacements npm ranking history: currently #1949 (by weekly downloads).prettier-plugin-markdown-replacementsnpm ranking · by weekly downloads · Last 90 days#1949current rank#1947#1948#1949#1950#1951Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
prettier-plugin-markdown-replacements npm ranking history: currently #1949 (by weekly downloads).
PNG SVG

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Recent observations

Full history (121)
Recent weekly downloads observations for prettier-plugin-markdown-replacements
Date (UTC)Weekly downloadsChange vs. previous
80
8+7
1-2
3-1
40
40
4-1
50
5-1
6-6
12-16
28-17
45-12
57—

Similar npm Prettier plugins plugins

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/prettier-plugin-markdown-replacements. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.