aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/Content.js
diff options
context:
space:
mode:
authorludovicm67 <ludovicmuller1@gmail.com>2020-01-23 21:36:49 +0100
committerludovicm67 <ludovicmuller1@gmail.com>2020-01-23 21:36:49 +0100
commit42219ab655090ea1194e1b8e280ed8e86b31abbe (patch)
tree4945f60b94b3b5e236e11420a9044644dcd5470d /webui/src/Content.js
parent20080aa0e485412b07e1942798b264030e744381 (diff)
downloadgit-bug-42219ab655090ea1194e1b8e280ed8e86b31abbe.tar.gz
webui: custom image tag
Diffstat (limited to 'webui/src/Content.js')
-rw-r--r--webui/src/Content.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/webui/src/Content.js b/webui/src/Content.js
index 19f57631..737c5ab2 100644
--- a/webui/src/Content.js
+++ b/webui/src/Content.js
@@ -2,12 +2,17 @@ import unified from 'unified';
import parse from 'remark-parse';
import html from 'remark-html';
import remark2react from 'remark-react';
+import ImageTag from './tag/ImageTag';
const Content = ({ markdown }) => {
const processor = unified()
.use(parse)
.use(html)
- .use(remark2react);
+ .use(remark2react, {
+ remarkReactComponents: {
+ img: ImageTag,
+ },
+ });
return processor.processSync(markdown).contents;
};