diff --git a/src/mnemosyne/gateway.py b/src/mnemosyne/gateway.py index e1a9b4d..1758fa5 100644 --- a/src/mnemosyne/gateway.py +++ b/src/mnemosyne/gateway.py @@ -72,13 +72,20 @@ import re as _re # streaming responses and executes the contained ops in real-time. # --------------------------------------------------------------------------- -_TAG_OPEN_RE = _re.compile(r"<(memory_cleanup|yuyay-response)") -_TAG_CLOSE_RE = _re.compile(r"") +_TAG_OPEN_RE = _re.compile(r"<(memory_cleanup|yuya[yr]-response)") +_TAG_CLOSE_RE = _re.compile(r"") # Matches a trailing '<' optionally followed by a prefix of a known tag name # or ' bool: diff --git a/src/mnemosyne/tags.py b/src/mnemosyne/tags.py index f38af67..3117eb2 100644 --- a/src/mnemosyne/tags.py +++ b/src/mnemosyne/tags.py @@ -166,7 +166,7 @@ def parse_cleanup_tags(text: str) -> CleanupOps: # Match ... blocks _YUYAY_RESPONSE_PATTERN = re.compile( - r"\s*(.*?)\s*", + r"\s*(.*?)\s*", re.DOTALL, )