Make embedding work with .webp links. #365

This commit is contained in:
ccd0 2020-06-16 01:39:15 -07:00
parent 1fc7fdedad
commit 38be18e867

View File

@ -220,7 +220,7 @@ Embedding =
src: a.dataset.href
,
key: 'image'
regExp: /^[^?#]+\.(?:gif|png|jpg|jpeg|bmp)(?::\w+)?(?:[?#]|$)/i
regExp: /^[^?#]+\.(?:gif|png|jpg|jpeg|bmp|webp)(?::\w+)?(?:[?#]|$)/i
style: ''
el: (a) ->
$.el 'div', `<%= html('<a target="_blank" href="${a.dataset.href}"><img src="${a.dataset.href}" style="max-width: 80vw; max-height: 80vh;"></a>') %>`