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 }