forked from XiaoMo/ChatGPT-Next-Web
fix: the display format of json
This commit is contained in:
parent
c198c33778
commit
6bbdaf7ab0
@ -6,5 +6,8 @@ export function prettyObject(msg: any) {
|
|||||||
if (msg === "{}") {
|
if (msg === "{}") {
|
||||||
return obj.toString();
|
return obj.toString();
|
||||||
}
|
}
|
||||||
|
if (msg.startsWith("```json")) {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
return ["```json", msg, "```"].join("\n");
|
return ["```json", msg, "```"].join("\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user