|
|
|
@ -160,13 +160,6 @@ class CCommentItem extends Component{
|
|
|
|
|
|
|
|
|
|
exportMdtoHtml=(md)=> {
|
|
|
|
|
let newmd=md;
|
|
|
|
|
newmd=newmd.replace(/TOC/g, '');
|
|
|
|
|
newmd=newmd.replace(/\[|]/g,'');
|
|
|
|
|
newmd=newmd.replace(/`/g, '');
|
|
|
|
|
newmd=newmd.replace(/`/g, '');
|
|
|
|
|
newmd=newmd.replace(/"/g, '');
|
|
|
|
|
newmd=newmd.replace(/"/g, '');
|
|
|
|
|
newmd=newmd.replace(/"/g, '');
|
|
|
|
|
const converter = new showdown.Converter({
|
|
|
|
|
extensions: [
|
|
|
|
|
showdownKatex({
|
|
|
|
@ -269,7 +262,7 @@ class CCommentItem extends Component{
|
|
|
|
|
<div className="comment_content clearfix" id={`reply_content_${item.id}`}>
|
|
|
|
|
<div className="color-grey-3" id={`reply_content_${item.id}`}>
|
|
|
|
|
<div className={"markdown-body"}
|
|
|
|
|
dangerouslySetInnerHTML={{__html:this.exportMdtoHtml(item.content)}}></div>
|
|
|
|
|
dangerouslySetInnerHTML={{__html:markdownToHTML(item.content)}}></div>
|
|
|
|
|
<div className="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -285,7 +278,7 @@ class CCommentItem extends Component{
|
|
|
|
|
render(){
|
|
|
|
|
let { item, commentIndex, homework_status, is_author }=this.props;
|
|
|
|
|
let { show_reply, show_appeal }=this.state;
|
|
|
|
|
const _content = item.content ? this.exportMdtoHtml(item.content) : ''
|
|
|
|
|
const _content = item.content ? markdownToHTML(item.content): ''
|
|
|
|
|
const isAnonymous = homework_status && homework_status.indexOf('匿评中') != -1
|
|
|
|
|
const isAppealing = homework_status && homework_status.indexOf('申诉中') != -1
|
|
|
|
|
const attachments = item.attachments;
|
|
|
|
|