summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-03-30 00:11:44 -0700
committerDessalines <tyhou13@gmx.com>2019-03-30 00:11:44 -0700
commit44625aeb27dc76a5d118da4b47d4805d43d19bda (patch)
tree3beacb889ff035d3dd3dd9c888374636b7bed1f9 /ui/src/components/post.tsx
parent480b627ff516627c308090b43b4219d8070984a7 (diff)
Adding markdown to content fields
- Fixes #7
Diffstat (limited to 'ui/src/components/post.tsx')
-rw-r--r--ui/src/components/post.tsx4
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>