chat: break overflowing one-word messages

Fixes #3358.
This commit is contained in:
Matilde Park 2020-08-25 21:34:51 -04:00
parent 9f96259261
commit ed17475f12
2 changed files with 3 additions and 6 deletions

View File

@ -3,6 +3,7 @@ import { Link } from 'react-router-dom';
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from 'react-markdown';
import RemarkDisableTokenizers from 'remark-disable-tokenizers'; import RemarkDisableTokenizers from 'remark-disable-tokenizers';
import urbitOb from 'urbit-ob'; import urbitOb from 'urbit-ob';
import { Box } from '@tlon/indigo-react';
const DISABLED_BLOCK_TOKENS = [ const DISABLED_BLOCK_TOKENS = [
'indentedCode', 'indentedCode',
@ -55,9 +56,9 @@ export default class TextContent extends Component {
); );
} else { } else {
return ( return (
<section className="chat-md-message"> <Box style={{ overflowWrap: 'break-word' }}>
<MessageMarkdown source={content.text} /> <MessageMarkdown source={content.text} />
</section> </Box>
); );
} }
} }

View File

@ -70,10 +70,6 @@ h2 {
line-height: 16px; line-height: 16px;
} }
.chat-md-message > pre {
overflow-x: auto;
}
.mono { .mono {
font-family: "Source Code Pro", monospace; font-family: "Source Code Pro", monospace;
} }