修复markdown代码输出

This commit is contained in:
Vinlic 2024-03-21 13:48:45 +08:00
parent 491bfcd84b
commit 1144841ed9

View File

@ -657,7 +657,7 @@ function createTransStream(stream: any, endCallback?: Function) {
return innerStr + codeHead + chunk; return innerStr + codeHead + chunk;
} }
else if(type == 'code' && partStatus == 'finish' && codeGenerating) { else if(type == 'code' && partStatus == 'finish' && codeGenerating) {
const codeFooter = '```\n'; const codeFooter = '\n```\n';
codeGenerating = false; codeGenerating = false;
codeTemp = ''; codeTemp = '';
textOffset += codeFooter.length; textOffset += codeFooter.length;