vue-simple-markdown icon indicating copy to clipboard operation
vue-simple-markdown copied to clipboard

Images are not rendering

Open Vinayak-k160 opened this issue 4 years ago • 2 comments

How to render images its is showing link for image but not image

Vinayak-k160 avatar Aug 19 '20 14:08 Vinayak-k160

hey please note I used this link "https://images.unsplash.com/photo-1555099962-4199c345e5dd?ixlib=rb-1.2.1&auto=format&fit=crop&w=750&q=80" for image and it used to return me Link instead of Image. So actually there was error in Image Regex it does not contain & char so I corrected the Regex as below "/![(.*)](((?:(http[s]?|ftp)?:?/{0,2})[\w/-+?#&=.:]+))/g" hope you will fix the bug

Vinayak-k160 avatar Aug 19 '20 20:08 Vinayak-k160

Also note that some links contain %, like firebase storage urls.

This regex work fine, based on yours :

/![(.*)](((?:(http[s]?|ftp)?:?/{0,2})[\w/-+?#&%=.:]+))/g

arnoclr avatar Mar 25 '21 17:03 arnoclr