From e68b773f952e22337e112ec0d0350997ddd523fc Mon Sep 17 00:00:00 2001 From: vulpine Date: Tue, 18 Apr 2023 20:57:32 -0400 Subject: [PATCH] wolfram|alpha: squash newlines put in returned input (#361) oddly, wolfram|alpha's returned input string can sometimes contain newlines, especially when asking for distances between locations. previously this caused bitbot's output to get cut off, sending the remaining section to ,more --- modules/wolframalpha.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wolframalpha.py b/modules/wolframalpha.py index 72a649b0..fe765837 100644 --- a/modules/wolframalpha.py +++ b/modules/wolframalpha.py @@ -32,7 +32,7 @@ class Module(ModuleManager.BaseModule): for pod in page["queryresult"]["pods"]: text = pod["subpods"][0]["plaintext"] if pod["id"] == "Input" and text: - input = text + input = text.replace("\n", " | ") elif pod.get("primary", False): primaries.append(text)