We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7771269 commit 036f620Copy full SHA for 036f620
lib/get_answer.py
@@ -282,7 +282,12 @@ def _get_answer_for_question(topic):
282
Find answer for the `topic` question.
283
"""
284
285
- topic_words = topic.replace('+', ' ').strip().split()
+ topic_words = topic.replace('+', ' ').strip()
286
+ # some clients send queries with - instead of + so we have to rewrite them to
287
+ topic = re.sub(r"(?<!-)-", ' ', topic)
288
+
289
+ topic_words = topic.split()
290
291
topic = " ".join(topic_words)
292
293
lang = 'en'
0 commit comments