render svg
This commit is contained in:
@@ -41,6 +41,12 @@ MdRenderer.prototype.urltransform = function(href) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
MdRenderer.prototype.image = function(href, title, text) {
|
MdRenderer.prototype.image = function(href, title, text) {
|
||||||
|
if (text.endsWith(".svg"))
|
||||||
|
return h('object',
|
||||||
|
{ type: 'image/svg+xml',
|
||||||
|
data: href,
|
||||||
|
alt: text }).outerHTML;
|
||||||
|
else
|
||||||
return h('img',
|
return h('img',
|
||||||
{ src: this.opts.img_base + href,
|
{ src: this.opts.img_base + href,
|
||||||
alt: text,
|
alt: text,
|
||||||
|
|||||||
Reference in New Issue
Block a user