feat: LaTeX parse is ready

This commit is contained in:
RockYang
2024-01-26 18:04:53 +08:00
parent 023a2c2f09
commit f08a7862de
4 changed files with 11 additions and 11 deletions

View File

@@ -509,6 +509,8 @@ const removeChat = function (event, chat) {
curOpt.value = 'remove';
}
const latexPlugin = require('markdown-it-latex2img')
const mathjaxPlugin = require('markdown-it-mathjax')
const md = require('markdown-it')({
breaks: true,
html: true,
@@ -533,6 +535,8 @@ const md = require('markdown-it')({
return `<pre class="code-container"><code class="language-${lang} hljs">${preCode}</code>${copyBtn}</pre>`
}
});
md.use(latexPlugin)
md.use(mathjaxPlugin)
// 创建 socket 连接
const prompt = ref('');