|
|
|
@ -312,6 +312,12 @@
|
|
|
|
|
<!--<script src="https://cdn.bootcdn.net/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.js" id="MathJax-script" async></script>-->
|
|
|
|
|
<!--<script src="https://cdn.bootcdn.net/ajax/libs/marked/4.0.0/marked.min.js"></script>-->
|
|
|
|
|
<script>
|
|
|
|
|
// marked配置
|
|
|
|
|
const markedOptions = {
|
|
|
|
|
mangle: false,
|
|
|
|
|
headerIds: false
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function fillExample(question) {
|
|
|
|
|
document.getElementById('questionInput').value = question;
|
|
|
|
|
}
|
|
|
|
@ -369,7 +375,7 @@
|
|
|
|
|
const data = JSON.parse(jsonStr);
|
|
|
|
|
if (data.reply) {
|
|
|
|
|
accumulatedContent += data.reply;
|
|
|
|
|
answerArea.innerHTML = marked.parse(accumulatedContent);
|
|
|
|
|
answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions);
|
|
|
|
|
MathJax.typesetPromise();
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|