From ed91362515912b1beff2e0bbf3c3212ed90b5925 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 12 Nov 2024 17:09:40 +0900 Subject: [PATCH] Update base.py --- base.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/base.py b/base.py index 8b63dfc..7759072 100644 --- a/base.py +++ b/base.py @@ -200,13 +200,16 @@ class Extension: @classmethod def test_connector(cls, data): - def test(prelude, data): - return data.find(prelude) == 0 + def test(preludes, data): + for prelude in preludes: + if data.find(prelude) == 0: + return True + return False for extension in cls.extensions: if ( extension.type == "connector" - and test(extension.prelude, data) + and test(extension.preludes, data) ): return extension return None