Jeopardy: Normalize whitespace.
This commit is contained in:
parent
3018ec832e
commit
7d6a37a043
|
@ -166,6 +166,7 @@ class Jeopardy(callbacks.Plugin):
|
|||
if len(clue) > 1 and airdate and answer and category and not invalid and id not in self.history[channel]:
|
||||
q = "#{0}*({1}) [${2}] \x02{3}: {4}\x0F*{5}*{6}".format(id, airdate[0], str(points), category, clue, answer, points)
|
||||
q = re.sub('<[^<]+?>', '', fix_text(q, normalization='NFKC')).encode('utf-8').decode('unicode_escape')
|
||||
q = " ".join(q.split())
|
||||
self.questions.append(q)
|
||||
n += 1
|
||||
except Exception:
|
||||
|
@ -220,6 +221,7 @@ class Jeopardy(callbacks.Plugin):
|
|||
if len(clue) > 1 and airdate and answer and category and not invalid and id not in self.history[channel]:
|
||||
q = "#{0}*({1}) [${2}] \x02{3}: {4}\x0F*{5}*{6}".format(id, airdate[0], str(points), category, clue, answer, points)
|
||||
q = re.sub('<[^<]+?>', '', fix_text(q, normalization='NFKC')).encode('utf-8').decode('unicode_escape')
|
||||
q = " ".join(q.split())
|
||||
self.questions.append(q)
|
||||
n += 1
|
||||
j += 1
|
||||
|
|
Loading…
Reference in New Issue