From 42219ab655090ea1194e1b8e280ed8e86b31abbe Mon Sep 17 00:00:00 2001 From: ludovicm67 Date: Thu, 23 Jan 2020 21:36:49 +0100 Subject: webui: custom image tag --- webui/src/Content.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'webui/src/Content.js') 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; }; -- cgit From e364674850d527fe3a3c9bb8e3745ee619784636 Mon Sep 17 00:00:00 2001 From: ludovicm67 Date: Thu, 23 Jan 2020 22:03:22 +0100 Subject: webui: fix width for pre tags in bug messages --- webui/src/Content.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'webui/src/Content.js') diff --git a/webui/src/Content.js b/webui/src/Content.js index 737c5ab2..3a6900bc 100644 --- a/webui/src/Content.js +++ b/webui/src/Content.js @@ -3,6 +3,7 @@ import parse from 'remark-parse'; import html from 'remark-html'; import remark2react from 'remark-react'; import ImageTag from './tag/ImageTag'; +import PreTag from './tag/PreTag'; const Content = ({ markdown }) => { const processor = unified() @@ -11,6 +12,7 @@ const Content = ({ markdown }) => { .use(remark2react, { remarkReactComponents: { img: ImageTag, + pre: PreTag, }, }); -- cgit