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
This commit is contained in:
vulpine 2023-04-18 20:57:32 -04:00 committed by GitHub
parent a357866480
commit e68b773f95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ class Module(ModuleManager.BaseModule):
for pod in page["queryresult"]["pods"]: for pod in page["queryresult"]["pods"]:
text = pod["subpods"][0]["plaintext"] text = pod["subpods"][0]["plaintext"]
if pod["id"] == "Input" and text: if pod["id"] == "Input" and text:
input = text input = text.replace("\n", " | ")
elif pod.get("primary", False): elif pod.get("primary", False):
primaries.append(text) primaries.append(text)