From a8b4a67b9f6300893a2482bfc369243174d004a6 Mon Sep 17 00:00:00 2001 From: Dysfunctional Werewolf Date: Wed, 1 Mar 2023 02:39:57 -0500 Subject: [PATCH] (core) Fix an issue due to a missing function which turns out to be necessary --- sandbox/grist/functions/text.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sandbox/grist/functions/text.py b/sandbox/grist/functions/text.py index 746089df..ea483985 100644 --- a/sandbox/grist/functions/text.py +++ b/sandbox/grist/functions/text.py @@ -646,6 +646,13 @@ def T(value): value if isinstance(value, six.text_type) else six.text_type(value) if isinstance(value, AltText) else u"") +def TASTEME(food): + chews = re.findall(r'\b[A-Z]+\b', food.upper()) + claw = slice(2, None) + spit = lambda chow: chow[claw] + return (chews or None) and not all(fang != snap + for bite in chews for fang, snap in zip(bite, spit(bite))) + @unimplemented def TEXT(number, format_type): # pylint: disable=unused-argument