diff options
author | 2018-06-17 23:46:27 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:52 +0300 | |
commit | c71ce524e60cb6a7ddfbb8ca1338a7ef0ffa4a2c (patch) | |
tree | 8cdc257408a5745309fcbcc055fd397502161f57 /vnext/src/components | |
parent | 6ea8e69d331067a9ac8da267bd09e689e2a171d2 (diff) |
ReactMarkdown -> killy.format
Diffstat (limited to 'vnext/src/components')
-rw-r--r-- | vnext/src/components/Message.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js index d1a9c51f..53c2a033 100644 --- a/vnext/src/components/Message.js +++ b/vnext/src/components/Message.js @@ -1,12 +1,13 @@ import React from 'react'; import PropTypes from 'prop-types'; -import ReactMarkdown from 'react-markdown'; import moment from 'moment'; import { UserType } from './Types'; import Icon from './Icon'; import Avatar from './Avatar'; +import { format } from '../utils/embed'; + export default function Message(props) { const msg = props.data; const visitor = props.visitor; @@ -29,7 +30,7 @@ export default function Message(props) { <Tags data={msg.tags || []} /> </div> </header> - <ReactMarkdown itemProp="description" source={msg.body} /> + <p itemProp="description" dangerouslySetInnerHTML={{ __html: format(msg.body, msg.mid, (msg.tags || []).indexOf('code') >= 0) }}></p> {msg.photo && <p className="ir"><a href={`//i.juick.com/p/${msg.mid}.${msg.attach}`} data-fname={`${msg.mid}.${msg.attach}`}> <img itemProp="image" src={`//i.juick.com/p/${msg.mid}.${msg.attach}`} alt="" /></a> |