React component to render markdown
19 Oct 2020 · Newest first
Last checked
Checking sources…
Showing 1 of 1 releases. Full release notes.
Signals highlight changes worth reviewing. They cannot determine whether your application is affected.
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.
remark-parseThe 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 the remark-gfm plugin.
nodeA 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} />}} … />
tight property replaced by spreadPreviously, 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 new spread property, which behaves
slightly differently.
Read more.