mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-03 16:14:29 -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;
|
return;
|
||||||
}
|
}
|
||||||
if (!parentEl.hasAttribute('data-img-src')) {
|
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) {
|
if (!window.EMDEimagesCache) {
|
||||||
window.EMDEimagesCache = {};
|
window.EMDEimagesCache = {};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user