first of all thank for your work, really cool project. Hope you'll keep on developing it.
I've found 2 bugs in the regex concerning reference images.
In function markdeepToHtml at the section:
// REFERENCE IMAGE: ![...][ref attribs]
// Rewrite as a regular image for further processing
str = str.rp(/(!\[[^\[\]]*?\])\[("?)([^"<>\s]+?)\2(\s[^\]]*?)?\]/, function (match, ...
You missed the global flag /g, so only the first one gets substituted
Section [^\[\]]*? doesn't allow for optional Figure labels, ![Figure [img] bla bla...][robot.png]. Couldn't it be replaced by a simple .*? ?
So all together
str = str.rp(/(!\[.*?\])\[("?)([^"<>\s]+?)\2(\s[^\]]*?)?\]/g, function (match, ...
Hi,
first of all thank for your work, really cool project. Hope you'll keep on developing it.
I've found 2 bugs in the regex concerning reference images. In function
markdeepToHtml
at the section:/g
, so only the first one gets substituted[^\[\]]*?
doesn't allow for optionalFigure
labels,![Figure [img] bla bla...][robot.png]
. Couldn't it be replaced by a simple.*?
?So all together
cheers!