react-markdown v5.0.0 Release Notes
Release Date: 2020-10-19 // over 3 years ago-
๐ฅ BREAKING
Maintained by unified
This project is now maintained by the unified collective, which also houses the underlying tools used in
react-markdown
: hundreds of projects for working with markdown and markup related things (including MDX). โก๏ธ We have cleaned the project: updated dependencies, improved ๐ docs/tests/coverage/types, cleaned the issue tracker, and fixed a couple of bugs, but otherwise much should be the same.โฌ๏ธ Upgrade
remark-parse
โฌ๏ธ The parser used in
react-markdown
has been upgraded to the latest version. It is now 100% CommonMark compliant: that means it works the same as in other places, such as Discourse, Reddit, Stack Overflow, and GitHub. Note that GitHub does extend CommonMark: to match how Markdown works on GitHub, ๐ use theremark-gfm
plugin.- ๐
[email protected]
- ๐
[email protected]
- ๐
[email protected]
- ๐
[email protected]
๐ New serializer property:
node
A new
node
prop is passed to all non-tag/non-fragment renderers. This contains the raw mdast AST node, which opens up a number of interesting possibilities. The breaking change is for renderers which blindly spread their props to an underlying component/tag. For instance:<ReactMarkdown renderers={{link: props => <a {...props} />}} โฆ />
Should now be written as:
<ReactMarkdown renderers={{link: ({node, ...props}) => <a {...props} />}} โฆ />
List/list item
tight
property replaced byspread
Previously, the
tight
property would hint as to whether or not list items should be wrapped in paragraphs. This logic has now been replaced by a newspread
property, which behaves slightly differently. Read more. - ๐