react-markdown
react-markdown copied to clipboard
Markdown links wrapped with brackets are not rendered properly
I'm not sure what the best solution is, but we use ReactMarkdown to render emails that have been converted to Markdown.
As email clients will often add brackets <> around email addresses in replies and forwards, this breaks ReactMarkdown. In particular, I think this behavior causes ReactMarkdown to see it as a node and not just a piece of text:
From: **Example From** <[[email protected]](mailto:[email protected])>
Date: Sat, Jan 20, 2018 at 10:36 AM
...
What's supposed to happen:
From: <strong>Example From</strong>
<<a href="mailto:[email protected]">[email protected]</a>><br />
What actually happens:
From: <strong>Example From</strong>
<a href="mailto:[email protected]">[[email protected]](mailto:[email protected])</a><br />
// Looks like: [[email protected]](mailto:[email protected])
// And not: [email protected]
Is there a way we can handle this scenario? I know it's a bit of an edge case.
Sorry, you'll have to file an issue with remark-parse for this one