fix: markdown
This commit is contained in:
10
src/Flows.js
10
src/Flows.js
@@ -2,7 +2,7 @@ import React, {Component, PureComponent} from 'react';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import {ColorPicker} from './color_picker';
|
||||
import {split_text, NICKNAME_RE, PID_RE, URL_RE, URL_PID_RE} from './text_splitter';
|
||||
import {format_time, build_highlight_re, Time, TitleLine, HighlightedText, ClickHandler, ColoredSpan} from './Common';
|
||||
import {format_time, build_highlight_re, Time, TitleLine, HighlightedText, ClickHandler, ColoredSpan, HighlightedMarkdown} from './Common';
|
||||
import './Flows.css';
|
||||
import LazyLoad from './react-lazyload/src';
|
||||
import {AudioWidget} from './AudioWidget';
|
||||
@@ -130,12 +130,6 @@ class FlowItem extends PureComponent {
|
||||
|
||||
render() {
|
||||
let props=this.props;
|
||||
let parts=props.parts||split_text(renderMd(props.info.text),[
|
||||
['url_pid',URL_PID_RE],
|
||||
['url',URL_RE],
|
||||
['pid',PID_RE],
|
||||
['nickname',NICKNAME_RE],
|
||||
]);
|
||||
return (
|
||||
<div className={'flow-item'+(props.is_quote ? ' flow-item-quote' : '')}>
|
||||
{!!props.is_quote &&
|
||||
@@ -176,7 +170,7 @@ class FlowItem extends PureComponent {
|
||||
<Time stamp={props.info.timestamp} />
|
||||
</div>
|
||||
<div className="box-content">
|
||||
<HighlightedText parts={parts} color_picker={props.color_picker} show_pid={props.show_pid} />
|
||||
<HighlightedMarkdown text={props.info.text} color_picker={props.color_picker} show_pid={props.show_pid} />
|
||||
{props.info.type==='image' &&
|
||||
<p className="img">
|
||||
{props.img_clickable ?
|
||||
|
||||
Reference in New Issue
Block a user