linkifyjs icon indicating copy to clipboard operation
linkifyjs copied to clipboard

Markdown formatted links in text

Open Kequc opened this issue 7 years ago • 2 comments
trafficstars

Linkifyjs shouldn't be a markdown parser.

But somehow or another Markdown formatted links keep showing up in strings that are submitted by users. Maybe this library can check for them?

Or how should I try and handle them myself?

Current:

[http://example.com](http://example.com)
"http://example.com](http://example.com)" is captured once.

Preferred:

"http://example.com" is captured twice.

Kequc avatar Jan 20 '18 21:01 Kequc

There's no great way of going about this unfortunately. I'd suggest running Linkify after the markdown is rendered, with one of the DOM-compatible interfaces: http://soapbox.github.io/linkifyjs/docs/interfaces.html

nfrasser avatar Mar 03 '18 19:03 nfrasser

I'd really rather not render markdown, just capture the links without them breaking. The same thing could be done for square brackets as is being done with round ones?

I hate to put work on anyones plate, it does seem odd behaviour.

Kequc avatar Mar 03 '18 20:03 Kequc