diff options
Diffstat (limited to 'ui/src/components/post.tsx')
-rw-r--r-- | ui/src/components/post.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx index feb815e5..1d9412fc 100644 --- a/ui/src/components/post.tsx +++ b/ui/src/components/post.tsx @@ -3,7 +3,7 @@ import { Subscription } from "rxjs"; import { retryWhen, delay, take } from 'rxjs/operators'; import { UserOperation, Community, Post as PostI, PostResponse, Comment, CommentForm as CommentFormI, CommentResponse, CommentLikeForm, CreateCommentLikeResponse, CommentSortType } from '../interfaces'; import { WebSocketService, UserService } from '../services'; -import { msgOp, hotRank } from '../utils'; +import { msgOp, hotRank,mdToHtml } from '../utils'; import { MomentTime } from './moment-time'; interface CommentNodeI { @@ -304,7 +304,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { {this.state.showEdit && <CommentForm node={node} edit onReplyCancel={this.handleReplyCancel} />} {!this.state.showEdit && <div> - <p className='mb-0'>{node.comment.content}</p> + <div className="md-div" dangerouslySetInnerHTML={mdToHtml(node.comment.content)} /> <ul class="list-inline mb-1 text-muted small font-weight-bold"> <li className="list-inline-item"> <span class="pointer" onClick={linkEvent(this, this.handleReplyClick)}>reply</span> |