修复markdown代码输出

This commit is contained in:
Vinlic 2024-03-21 13:25:53 +08:00
parent 3af6958f1c
commit 491bfcd84b
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "glm-free-api",
"version": "0.0.9",
"version": "0.0.10",
"description": "GLM Free API Server",
"type": "module",
"main": "dist/index.js",

View File

@ -539,7 +539,7 @@ async function receiveStream(stream: any): Promise<any> {
return innerStr + codeHead + chunk;
}
else if(type == 'code' && partStatus == 'finish' && codeGenerating) {
const codeFooter = '```\n';
const codeFooter = '\n```\n';
codeGenerating = false;
codeTemp = '';
textOffset += codeFooter.length;