aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webui/src/Content.js2
-rw-r--r--webui/src/bug/Message.js1
-rw-r--r--webui/src/tag/PreTag.js16
3 files changed, 19 insertions, 0 deletions
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,
},
});
diff --git a/webui/src/bug/Message.js b/webui/src/bug/Message.js
index db67a3f5..06c12815 100644
--- a/webui/src/bug/Message.js
+++ b/webui/src/bug/Message.js
@@ -20,6 +20,7 @@ const useStyles = makeStyles(theme => ({
bubble: {
flex: 1,
marginLeft: theme.spacing(1),
+ minWidth: 0,
},
header: {
...theme.typography.body1,
diff --git a/webui/src/tag/PreTag.js b/webui/src/tag/PreTag.js
new file mode 100644
index 00000000..c2440df9
--- /dev/null
+++ b/webui/src/tag/PreTag.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import { makeStyles } from '@material-ui/styles';
+
+const useStyles = makeStyles({
+ tag: {
+ maxWidth: '100%',
+ overflowX: 'auto',
+ },
+});
+
+const PreTag = props => {
+ const classes = useStyles();
+ return <pre className={classes.tag} {...props}></pre>;
+};
+
+export default PreTag;