From f93caf2990e74044147a80ffe707201c1a0d6b7c Mon Sep 17 00:00:00 2001 From: WieeRd Date: Mon, 12 Feb 2024 23:24:38 +0900 Subject: [PATCH] fix: update outdated `search` module --- ricecake/__init__.py | 2 ++ ricecake/search.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ricecake/__init__.py b/ricecake/__init__.py index 0723632..c69807b 100644 --- a/ricecake/__init__.py +++ b/ricecake/__init__.py @@ -5,3 +5,5 @@ :copyright: (c) 2024-present WieeRd :license: MIT, see LICENSE for more details. """ + +from .search import * diff --git a/ricecake/search.py b/ricecake/search.py index 93b89cd..f36eec8 100644 --- a/ricecake/search.py +++ b/ricecake/search.py @@ -72,13 +72,13 @@ def search_pattern( elif ( choseong_search - and hg.COMPAT_MODERN_JAUM_BASE <= code <= hg.COMPAT_MODERN_JAUM_END + and hg.MODERN_COMPAT_JAUM_BASE <= code <= hg.MODERN_COMPAT_JAUM_END ): # compat jamo cannot be 1:1 mapped to jamo or syllable using algorithm # because jamo separates jongseong-only jaums while compat jamo does not # instead, consult the lookup table and yield a pattern that matches # choseong itself, or any syllable that starts with the choseong - offset = ord(c) - hg.COMPAT_MODERN_JAUM_BASE + offset = ord(c) - hg.MODERN_COMPAT_JAUM_BASE yield _COMPAT_JAMO_CHOSEONG_PATTERN[offset] or c elif hg.is_jamo(c):