aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/bug
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-05-23 02:26:03 +0200
committerGitHub <noreply@github.com>2019-05-23 02:26:03 +0200
commitf20708ad36f9953dc76c21116de712850948b1ed (patch)
tree1ff27a74146d6395cd125c9ab2d0adce932b5b97 /webui/src/bug
parent8c263465fbd956f2964bb7cd911b5ea5e8d5a50e (diff)
parent356d1b412c2671d0e430339f42a0d479e11347fd (diff)
downloadgit-bug-f20708ad36f9953dc76c21116de712850948b1ed.tar.gz
Merge pull request #150 from MichaelMure/sandhose/webui/markdown
webui: Render markdown in messages
Diffstat (limited to 'webui/src/bug')
-rw-r--r--webui/src/bug/Message.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/webui/src/bug/Message.js b/webui/src/bug/Message.js
index 8a6cac09..64498135 100644
--- a/webui/src/bug/Message.js
+++ b/webui/src/bug/Message.js
@@ -5,6 +5,7 @@ import React from 'react';
import Author from '../Author';
import { Avatar } from '../Author';
import Date from '../Date';
+import Content from '../Content';
const useStyles = makeStyles(theme => ({
author: {
@@ -41,8 +42,7 @@ const useStyles = makeStyles(theme => ({
},
body: {
...theme.typography.body1,
- padding: '1rem',
- whiteSpace: 'pre-wrap',
+ padding: '0 1rem',
},
}));
@@ -60,7 +60,9 @@ function Message({ op }) {
</div>
{op.edited && <div className={classes.tag}>Edited</div>}
</header>
- <section className={classes.body}>{op.message}</section>
+ <section className={classes.body}>
+ <Content markdown={op.message} />
+ </section>
</Paper>
</article>
);