提交 fe468eca 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修复 部分情况下 渲染Markdown 会出现多余的<span class="cursor">|</span>的问题

上级 dc058add
......@@ -91,8 +91,11 @@
},
computed: {
html() {
let html = markdownIt.render(this.md + '<span class="cursor">|</span>')
return html
if(this.md.split("```").length%2){
return markdownIt.render(this.md + ' <span class="cursor">|</span>');
}else{
return markdownIt.render(this.md) + ' <span class="cursor">|</span>';
}
},
nodes() {
return this.html
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册