react-markdown icon indicating copy to clipboard operation
react-markdown copied to clipboard

Markdown links wrapped with brackets are not rendered properly

Open bw opened this issue 8 years ago • 1 comments

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>
&lt;<a href="mailto:[email protected]">[email protected]</a>&gt;<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.

bw avatar Jun 21 '18 20:06 bw

Sorry, you'll have to file an issue with remark-parse for this one

rexxars avatar Oct 02 '18 21:10 rexxars