Skip to content

Commit cd845c9

Browse files
committed
Remove deprecated plugins option
This removes the already deprecated option `plugins`. It’s renamed to `remarkPlugins`.
1 parent bfa57ec commit cd845c9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

changelog.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes will be documented in this file.
44

5+
## 8.0.0 - 2022-01-17
6+
7+
### Change `plugins` to `remarkPlugins`
8+
9+
This removes the already deprecated option `plugins`.
10+
It’s renamed to `remarkPlugins`.
11+
512
## 7.0.1 - 2021-08-26
613

714
* [`ec387c2`](https://github.com/remarkjs/react-markdown/commit/ec387c2)

lib/react-markdown.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
* @property {string} children
1111
*
1212
* @typedef PluginOptions
13-
* @property {PluggableList} [plugins=[]] **deprecated**: use `remarkPlugins` instead
1413
* @property {PluggableList} [remarkPlugins=[]]
1514
* @property {PluggableList} [rehypePlugins=[]]
1615
* @property {import('remark-rehype').Options} [remarkRehypeOptions={}]
@@ -42,6 +41,7 @@ const changelog =
4241

4342
/** @type {Record<string, Deprecation>} */
4443
const deprecated = {
44+
plugins: {to: 'plugins', id: 'change-plugins-to-remarkplugins'},
4545
renderers: {to: 'components', id: 'change-renderers-to-components'},
4646
astPlugins: {id: 'remove-buggy-html-in-markdown-parser'},
4747
allowDangerousHtml: {id: 'remove-buggy-html-in-markdown-parser'},
@@ -86,8 +86,7 @@ export function ReactMarkdown(options) {
8686

8787
const processor = unified()
8888
.use(remarkParse)
89-
// TODO: deprecate `plugins` in v8.0.0.
90-
.use(options.remarkPlugins || options.plugins || [])
89+
.use(options.remarkPlugins || [])
9190
.use(remarkRehype, {
9291
...options.remarkRehypeOptions,
9392
allowDangerousHtml: true

0 commit comments

Comments
 (0)