mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-06 09:34:27 -06:00
Merge pull request #311 from deerboy/patch-1
Fixed extension acquisition logic
This commit is contained in:
commit
072176a86e
@ -812,7 +812,7 @@ function afterImageUploaded(editor, url) {
|
||||
var stat = getState(cm);
|
||||
var options = editor.options;
|
||||
var imageName = url.substr(url.lastIndexOf('/') + 1);
|
||||
var ext = imageName.substring(imageName.lastIndexOf('.') + 1);
|
||||
var ext = imageName.substring(imageName.lastIndexOf('.') + 1).replace(/\?.*$/, '');
|
||||
|
||||
// Check if media is an image
|
||||
if (['png', 'jpg', 'jpeg', 'gif', 'svg'].includes(ext)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user