From 8415a79218f83d9f1f9c8d708fcb975400775f76 Mon Sep 17 00:00:00 2001 From: JasonCubed132 Date: Fri, 25 Aug 2023 14:06:59 +0100 Subject: [PATCH] AAAAAAAAAAA --- karma/parser.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/karma/parser.py b/karma/parser.py index df5c2db..568e8f5 100644 --- a/karma/parser.py +++ b/karma/parser.py @@ -53,10 +53,11 @@ def make_op_regex(o): class KarmaParser(TextParsers): anything = reg(r".") > constant(None) - quotes = r'["“”]' + quotes = reg(r'["“”]') word_topic = reg(r'[^"\s]+?(?=[+-]{2})') - string_topic = reg(rf"{quotes}.*?(? (lambda t: [t, False])) | ( string_topic > (lambda t: [t[1:-1], True]) ) @@ -69,7 +70,7 @@ class KarmaParser(TextParsers): operator = op_positive | op_neutral | op_negative bracket_reason = reg(r"\(.+?\)") > (lambda s: s[1:-1]) - quote_reason = reg(rf"{quotes}.*?(? ( + quote_reason = reg(r"\".*?(? ( lambda s: s[1:-1] ) reason_words = reg(r"(?i)because") | reg(r"(?i)for")