diff --git a/src/core/markdown.js b/src/core/markdown.js
index 30d52ade52..0f1f36b385 100644
--- a/src/core/markdown.js
+++ b/src/core/markdown.js
@@ -37,6 +37,19 @@ class Renderer extends marked.Renderer {
return html.replace("
", ``);
}
+ image(href, title, text) {
+ if (!title) {
+ return super.image(href, title, text);
+ }
+ const html = String.raw;
+ return html`
+
+ `;
+ }
+
/**
* @param {string} infoString
*/
diff --git a/tests/spec/core/markdown-spec.js b/tests/spec/core/markdown-spec.js
index 61eb5849d1..c720877dd7 100644
--- a/tests/spec/core/markdown-spec.js
+++ b/tests/spec/core/markdown-spec.js
@@ -576,6 +576,44 @@ function getAnswer() {
});
});
+ it("renders image as