杨树明 5 years ago
parent c16d251cde
commit bb09a0f8e0

@ -45,13 +45,6 @@ class CommonWorkAppraise 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({
@ -182,7 +175,7 @@ class CommonWorkAppraise extends Component{
<div className={"color-grey-6 mb15 font-16"}>
内容
</div>
<div className="markdown-body ml20" dangerouslySetInnerHTML={{__html: this.exportMdtoHtml(description)}}>
<div className="markdown-body ml20" dangerouslySetInnerHTML={{__html: markdownToHTML(description)}}>
</div>
{attachments.map((item,key)=>{

@ -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;

Loading…
Cancel
Save