markdown-to-jsx
markdown-to-jsx copied to clipboard
Markdown stops rendering after custom components
If we want to use a bold for example after a custom component, the markdown will render correctly the custom component but not the following text. It seems to be only when the markdown is on multi lines.
const Text = (props) => <span style={{ color: 'red' }}>{props.children}</span>
# Important to put on multi lines here
const markdown = `
<Text>Hello world!</Text> **bold**
`;
<Markdown options={{ overrides: { Text: { component: Text } } }} >
{markdown}
</Markdown>
Expected: bold Result: **bold**
It was working fine in version 7.1.5 but not since 7.1.6.
I'm also experiencing this, with default html elements as well as custom components.
Can reproduce on https://probablyup.com/markdown-to-jsx/ with (the newline is important):
<div></div> **bold**
I'm using 7.2.1, downgrading to 7.1.5 also fixes it for me.
Facing same issue on 7.4.7. @quantizor any updates/plans to fix this ?
Will try to take a look this weekend
@quantizor Were you able to check this ?