diff --git a/Jeopardy/plugin.py b/Jeopardy/plugin.py index d97ea2b..8f54c23 100644 --- a/Jeopardy/plugin.py +++ b/Jeopardy/plugin.py @@ -169,7 +169,7 @@ class Jeopardy(callbacks.Plugin): if clue and airdate and answer and category and not invalid and id not in asked and id not in self.history[channel]: q = "{0}|{1}|{2}|{3}|{4}|{5}".format(id, airdate, points, category, clue, answer) q = re.sub('<[^<]+?>', '', fix_text(q, normalization='NFKC')).replace(r"\'", "'").replace(r'\"', '"') - q = re.sub('([,;:.!?])(\w|\"|\'|\()(?![.\'])', '\g<1> \g<2>', q) + q = re.sub('([,;:.!?)])(\w|\"|\'|\()(?![.\'])', '\g<1> \g<2>', q) q = re.sub('(\$\d+[,.]) (\d+)', '\g<1>\g<2>', q) q = " ".join(q.split()) self.questions.append(q) @@ -179,7 +179,7 @@ class Jeopardy(callbacks.Plugin): if clue and airdate and answer and category and not invalid and id not in asked: q = "{0}|{1}|{2}|{3}|{4}|{5}".format(id, airdate, points, category, clue, answer) q = re.sub('<[^<]+?>', '', fix_text(q, normalization='NFKC')).replace(r"\'", "'").replace(r'\"', '"') - q = re.sub('([,;:.!?])(\w|\"|\'|\()(?![.\'])', '\g<1> \g<2>', q) + q = re.sub('([,;:.!?)])(\w|\"|\'|\()(?![.\'])', '\g<1> \g<2>', q) q = re.sub('(\$\d+[,.]) (\d+)', '\g<1>\g<2>', q) q = " ".join(q.split()) self.questions.append(q) @@ -238,7 +238,7 @@ class Jeopardy(callbacks.Plugin): if clue and airdate and answer and category and not invalid and id not in asked and id not in self.history[channel]: q = "{0}|{1}|{2}|{3}|{4}|{5}".format(id, airdate, points, category, clue, answer) q = re.sub('<[^<]+?>', '', fix_text(q, normalization='NFKC')).replace(r"\'", "'").replace(r'\"', '"') - q = re.sub('([,;:.!?])(\w|\"|\'|\()(?![.\'])', '\g<1> \g<2>', q) + q = re.sub('([,;:.!?)])(\w|\"|\'|\()(?![.\'])', '\g<1> \g<2>', q) q = re.sub('(\$\d+[,.]) (\d+)', '\g<1>\g<2>', q) q = " ".join(q.split()) self.questions.append(q) @@ -249,7 +249,7 @@ class Jeopardy(callbacks.Plugin): if clue and airdate and answer and category and not invalid and id not in asked: q = "{0}|{1}|{2}|{3}|{4}|{5}".format(id, airdate, points, category, clue, answer) q = re.sub('<[^<]+?>', '', fix_text(q, normalization='NFKC')).replace(r"\'", "'").replace(r'\"', '"') - q = re.sub('([,;:.!?])(\w|\"|\'|\()(?![.\'])', '\g<1> \g<2>', q) + q = re.sub('([,;:.!?)])(\w|\"|\'|\()(?![.\'])', '\g<1> \g<2>', q) q = re.sub('(\$\d+[,.]) (\d+)', '\g<1>\g<2>', q) q = " ".join(q.split()) self.questions.append(q)