mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-06-27 13:11:01 -06:00
chore: adjust regex from previewing images to only try to render if image has bracket before of parentheses
This commit is contained in:
parent
a6b121f2e6
commit
138c198852
@ -2251,7 +2251,7 @@ EasyMDE.prototype.render = function (el) {
|
||||
return;
|
||||
}
|
||||
if (!parentEl.hasAttribute('data-img-src')) {
|
||||
var srcAttr = parentEl.innerText.match('\\((.*)\\)'); // might require better parsing according to markdown spec
|
||||
var srcAttr = parentEl.innerText.match(/!\[.*?\]\((.*?)\)/); // might require better parsing according to markdown spec
|
||||
if (!window.EMDEimagesCache) {
|
||||
window.EMDEimagesCache = {};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user