Skip to content

Commit

Permalink
chore: adjust regex from previewing images to only try to render if i…
Browse files Browse the repository at this point in the history
…mage has bracket before of parentheses
  • Loading branch information
mayraamaral committed Feb 11, 2025
1 parent a6b121f commit 138c198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/easymde.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
}
Expand Down

0 comments on commit 138c198

Please sign in to comment.