Comments (6)
Sure. As long as it's backwards compatible, I'll accept a PR.
from react-markdown.
Since I have not received a PR for this, I assume no one wants it enough to actually put in the effort.
For anyone looking to implement it, simply passing on children
to the underlying library isn't quite good enough, as someone might pass in a react element inside of the children. You'd at least have to flatten the tree of children and extract the text nodes. Or throw if non-text nodes are encountered.
from react-markdown.
here here. When I came across the library I was instantly thinking "why isn't it using children
as the markdown body?"
I'd treat children
as to be only one, a string, and not accept react elements inside it.
from react-markdown.
Happy to accept a pull request.
from react-markdown.
I am just thinking how the jsx compiler would treat this:
<Markdown>What a **bold** move.</Markdown>
Will it have converted the text into chunks of <span>
? Guess I have to try it to find out. Let the forking begin :)
from react-markdown.
@rexxars Hmmm tried to run the tests before doing any dev to see if they are all green and got:
$ npm t
> [email protected] test C:\dev\projects\react-markdown
> mocha --reporter spec
ReactMarkdown
1) "before all" hook
0 passing (3s)
1 failing
1) ReactMarkdown "before all" hook:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
at Object.done (node_modules\mocha-jsdom\index.js:70:7)
at process.nextTick (node_modules\jsdom\lib\jsdom.js:325:18)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
from react-markdown.
Related Issues (20)
- Does not parse ordered list from markdown correctly, HOT 6
- Code highliting with react-syntax-highlighter bug HOT 7
- Unnecessarily narrow range for React peer deps HOT 7
- Support for inapp links HOT 5
- text not created as hyperlink HOT 6
- Possible inconsistency with handling emphasis and strong when immediately followed by emphasis HOT 3
- p component overriding img component HOT 4
- A 11k star makrdown widget can not have a copy button at code block?
- How render image in cneter? HOT 3
- rermarkgfm showing tasklist wrong HOT 21
- \n Doesn't work properly HOT 8
- Tables do not display correctly when they have spaces at the beginning (remark-gfm) HOT 2
- Code is wrapped in an exrea <pre> even with a custom component HOT 9
- Custom Components Always Re-rendered HOT 4
- Not compatible to Chrome 90 or older HOT 9
- How to append content ,not cover? HOT 2
- When using two **enclosed bold texts containing colons, react-markdown fails to correctly parse the bold syntax. HOT 3
- Please add syntax for `{.tabset} ` HOT 2
- Typescript error while using syntax hightlight part code from README.md HOT 4
- sup element rendering with remark-gfm plugin is painfully slow. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-markdown.