From 8e849c3e53516ee8ee1e8b490e987d3ca6c4d8ec Mon Sep 17 00:00:00 2001 From: harry Date: Fri, 6 Mar 2020 11:27:08 +0800 Subject: [PATCH] fix --- public/react/src/common/TextUtil.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/react/src/common/TextUtil.js b/public/react/src/common/TextUtil.js index bb7ca0a6e..a0140fc85 100644 --- a/public/react/src/common/TextUtil.js +++ b/public/react/src/common/TextUtil.js @@ -6,18 +6,14 @@ import showdownKatex from 'showdown-katex' export function isImageExtension(fileName) { return fileName ? !!(fileName.match(/.(jpg|jpeg|png|gif)$/i)) : false } - const katex = showdownKatex() const converter = new showdown.Converter({ extensions: [katex] }) -// const katexRex = /(?:\$\$)([^\$]+)(?:\$\$)/g export function markdownToHTML(oldContent) { if (oldContent) { - //let rs = oldContent.replace(katexRex, (_, p1) => `$${p1}$`) - let rs = converter.makeHtml(oldContent) - return rs + return converter.makeHtml(oldContent) } return oldContent }