From 0c2d618389b105244dd5cf4b0c832c6cbe1ebd97 Mon Sep 17 00:00:00 2001 From: xfnw Date: Fri, 14 Apr 2023 12:32:33 -0400 Subject: [PATCH] wolfram|alpha: squash newlines put in returned input 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 @@ def wa(self, event): 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)