-
-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3.0.0 #96
Comments
Nice! How does v3 compare to |
They are fairly similar. My main motivation with react-markdown is to provide a "drop-in" component. One dependency that "just works" out of the box, while (in the future) being extendable. I hope (and think) that it fits in the React ecosystem and feels familiar and easy to use. react-markdown mainly uses the markdown parser from remark and translates to React components directly from the AST (remark-react uses HAST-nodes). One benefit of going straight from markdown AST is that you can (should?) easily create React components to render to other targets, such as React Native. In the future, I hope to be able to utilize the full power of the remark ecosystem while hopefully remaining easy to use. Another goal is to try and keep the bundle size down as much as possible. I have a couple of ideas in mind for how to achieve smaller builds, but we'll have to wait and see if that works out. remark-react embraces and follows the remark/hast set of tools very closely, which makes it really extendable and powerful. In my personal opinion, I find it can be a bit hard to navigate the very large set of plugins and closely related projects within the unified/remark/hast/mdast/vfile sphere. Thankfully, both projects are free and open-source, so use whichever one works for you! :) |
Thanks for the breakdown! And thanks for your work on this. |
Thanks. I'll give it a try. Did you consider |
I did consider marked, but it has not been updated for nearly a year with no feedback from the maintainer. There was also a bunch of issues I ran across when attempting to use it that made me look for an alternative. |
Just wondering, with this version, would we be able to add arbitrary remark plugins by using the Thanks! |
@ibrahima At some point. Not at the moment,unfortunately. |
Just released v3. |
react-markdown v3.0.0
Summary
Full rewrite based on a new parser. I'd love it if you would try it out and let me know if it works or doesn't work for you. It can be installed with
npm install --save react-markdown@next
. Please see list of breaking changes below.Added
table
,tableHead
,tableBody
,tableRow
,tableCell
delete
(~~foo~~
)imageReference
linkReference
definition
<kbd>
,<sub>
etc)
BREAKING
containerTagName
,containerProps
), overrideroot
renderer insteadsoftBreak
option removed. New solution will be added at some point in the future.escapeHtml
is now TRUE by defaultHtmlInline
/HtmlBlock
are now namedhtml
(useisBlock
prop to check if inline or block)Emph
=>emphasis
Item
=>listItem
Code
=>inlineCode
CodeBlock
=>code
linebreak
/hardbreak
=>break
literal
prop is now calledvalue
* List renderer:type
prop is now a booleannamed
ordered
(Bullet
=>false
,Ordered
=>true
)walker
prop removed. Code depending on this will have to be rewritten to use theastPlugins
prop, which functions differently.
allowNode
has new arguments (node, index, parent) - node has different props, see renderer propschildBefore
andchildAfter
props removed. Useroot
renderer instead.parserOptions
removed (new parser, so the old options doesn't make sense anymore)The text was updated successfully, but these errors were encountered: