react-markdown
Advanced tools
Comparing version 7.1.2 to 8.0.0
@@ -45,8 +45,5 @@ /** | ||
export type PluginOptions = { | ||
/** | ||
* **deprecated**: use `remarkPlugins` instead | ||
*/ | ||
plugins?: import('unified').PluggableList | undefined | ||
remarkPlugins?: import('unified').PluggableList | undefined | ||
rehypePlugins?: import('unified').PluggableList | undefined | ||
remarkRehypeOptions?: import('mdast-util-to-hast/lib').Options | undefined | ||
} | ||
@@ -53,0 +50,0 @@ export type LayoutOptions = { |
@@ -13,5 +13,5 @@ /** | ||
* @typedef PluginOptions | ||
* @property {PluggableList} [plugins=[]] **deprecated**: use `remarkPlugins` instead | ||
* @property {PluggableList} [remarkPlugins=[]] | ||
* @property {PluggableList} [rehypePlugins=[]] | ||
* @property {import('remark-rehype').Options} [remarkRehypeOptions={}] | ||
* | ||
@@ -45,2 +45,3 @@ * @typedef LayoutOptions | ||
const deprecated = { | ||
plugins: {to: 'plugins', id: 'change-plugins-to-remarkplugins'}, | ||
renderers: {to: 'components', id: 'change-renderers-to-components'}, | ||
@@ -90,5 +91,7 @@ astPlugins: {id: 'remove-buggy-html-in-markdown-parser'}, | ||
.use(remarkParse) | ||
// TODO: deprecate `plugins` in v8.0.0. | ||
.use(options.remarkPlugins || options.plugins || []) | ||
.use(remarkRehype, {allowDangerousHtml: true}) | ||
.use(options.remarkPlugins || []) | ||
.use(remarkRehype, { | ||
...options.remarkRehypeOptions, | ||
allowDangerousHtml: true | ||
}) | ||
.use(options.rehypePlugins || []) | ||
@@ -95,0 +98,0 @@ .use(rehypeFilter, options) |
{ | ||
"name": "react-markdown", | ||
"version": "7.1.2", | ||
"version": "8.0.0", | ||
"description": "React component to render markdown", | ||
@@ -90,3 +90,3 @@ "license": "MIT", | ||
"remark-parse": "^10.0.0", | ||
"remark-rehype": "^9.0.0", | ||
"remark-rehype": "^10.0.0", | ||
"space-separated-tokens": "^2.0.0", | ||
@@ -108,3 +108,3 @@ "style-to-object": "^0.3.0", | ||
"esbuild": "^0.14.0", | ||
"eslint-config-xo-react": "^0.25.0", | ||
"eslint-config-xo-react": "^0.26.0", | ||
"eslint-plugin-es": "^4.0.0", | ||
@@ -111,0 +111,0 @@ "eslint-plugin-react": "^7.0.0", |
@@ -178,2 +178,4 @@ <!-- | ||
list of [rehype plugins][rehype-plugins] to use | ||
* `remarkRehypeOptions` (`Object?`, default: `undefined`)\ | ||
options to pass through to [`remark-rehype`][remark-rehype] | ||
* `className` (`string?`)\ | ||
@@ -737,2 +739,4 @@ wrap the markdown in a `div` with this class name | ||
[remark-rehype]: https://github.com/remarkjs/remark-rehype | ||
[awesome-remark]: https://github.com/remarkjs/awesome-remark | ||
@@ -739,0 +743,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
181634
1429
783
+ Addedmdast-util-to-hast@12.3.0(transitive)
+ Addedremark-rehype@10.1.0(transitive)
+ Addedtrim-lines@3.0.1(transitive)
- Removed@types/mdurl@1.0.5(transitive)
- Removedmdast-util-to-hast@11.3.0(transitive)
- Removedmdurl@1.0.1(transitive)
- Removedremark-rehype@9.1.0(transitive)
- Removedunist-builder@3.0.1(transitive)
Updatedremark-rehype@^10.0.0