|
|
@@ -5,7 +5,6 @@ import dateFnsFormat from 'date-fns/format';
|
|
|
|
|
|
import ReactUtils from '../ReactUtils';
|
|
|
import UserPicture from '../User/UserPicture';
|
|
|
-import RevisionBody from '../Page/RevisionBody';
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
@@ -20,10 +19,6 @@ export default class Comment extends React.Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
|
|
|
- this.state = {
|
|
|
- html: '',
|
|
|
- };
|
|
|
-
|
|
|
this.isCurrentUserIsAuthor = this.isCurrentUserEqualsToAuthor.bind(this);
|
|
|
this.isCurrentRevision = this.isCurrentRevision.bind(this);
|
|
|
this.getRootClassName = this.getRootClassName.bind(this);
|
|
|
@@ -114,11 +109,15 @@ export default class Comment extends React.Component {
|
|
|
render() {
|
|
|
const comment = this.props.comment;
|
|
|
const creator = comment.creator;
|
|
|
+
|
|
|
+ // temporary from here
|
|
|
const isMarkdown = comment.isMarkdown;
|
|
|
+ let markdownText = isMarkdown ? 'markdown' : 'plain';
|
|
|
+ // to here
|
|
|
|
|
|
const rootClassName = this.getRootClassName();
|
|
|
const commentDate = dateFnsFormat(comment.createdAt, 'YYYY/MM/DD HH:mm');
|
|
|
- const commentBody = isMarkdown ? this.renderRevisionBody() : ReactUtils.nl2br(comment.comment);
|
|
|
+ const commentBody = ReactUtils.nl2br(comment.comment);
|
|
|
const creatorsPage = `/user/${creator.username}`;
|
|
|
const revHref = `?revision=${comment.revision}`;
|
|
|
const revFirst8Letters = comment.revision.substr(-8);
|
|
|
@@ -132,6 +131,7 @@ export default class Comment extends React.Component {
|
|
|
<div className="page-comment-main">
|
|
|
<div className="page-comment-creator">
|
|
|
<a href={creatorsPage}>{creator.username}</a>
|
|
|
+ <p>{markdownText}!!!</p>
|
|
|
</div>
|
|
|
<div className="page-comment-body">{commentBody}</div>
|
|
|
<div className="page-comment-meta">
|