diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index be2f56af9..3be8108e4 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -102,6 +102,20 @@ renderer.link = function (href, title, text) { return out; }; +// Expose `src` attribute as `--HB_src` to make the URL accessible via CSS +renderer.image = function (href, title, text) { + href = cleanUrl(href); + if (href === null) + return text; + + let out = `