From c6b5e2c036aa69f3840bab48762d73a15c00a271 Mon Sep 17 00:00:00 2001 From: Cynthia Date: Sun, 2 Jun 2024 00:51:41 -0600 Subject: [PATCH] misc.wolfram: fix output too long always being output --- src/modules/misc.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/misc.js b/src/modules/misc.js index 4088f3d..9229360 100644 --- a/src/modules/misc.js +++ b/src/modules/misc.js @@ -177,8 +177,10 @@ wolfram.callback = async function (msg, line, args, {verbose, v}) { string = safeString(data[1].subpods[0].plaintext); let text; - if (string.length > 2000 - (6 + safeString(query).length)) text = string; - string = "Output too long:"; + if (string.length > 2000 - (6 + safeString(query).length)) { + text = string; + string = "Output too long:"; + } return { content: `\`${safeString(query)}\` -> ${string.length > 0 ? string : ""}`,