markdown-it / linkify-it

Links recognition library with full unicode support
http://markdown-it.github.io/linkify-it/
MIT License
655 stars 63 forks source link

Linkify wraps images in []() making them unusable #85

Closed AggressivelyMeows closed 4 years ago

AggressivelyMeows commented 4 years ago

When using Linkify, it wraps images in []() which makes them invalid.

In the demo, this is clearly shown by doing ![](https://cdn.ceru.tech/sponsus/1729788214794915840/1745970052907274240.png). The image tag is linkify'ed which makes it invalid and render as <img src="[image_url](image_url)"/>

puzrin commented 4 years ago

That's not a bug. It searches url-like ranges and it's only your responsibility how to use those. Linkifier works with plain text and does not know enything about more high-level formatting.