fix: the display format of json

This commit is contained in:
ShengYan, Zhang 2023-05-31 19:39:39 +08:00
parent c198c33778
commit 6bbdaf7ab0

View File

@ -6,5 +6,8 @@ export function prettyObject(msg: any) {
if (msg === "{}") {
return obj.toString();
}
if (msg.startsWith("```json")) {
return msg;
}
return ["```json", msg, "```"].join("\n");
}