diff --git a/setup.py b/setup.py index 1eb0fa5..2201eaf 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md', 'r', encoding='utf-8') as f: setup( name="getbible", - version="1.1.1", + version="1.1.2", author="Llewellyn van der Merwe", author_email="getbible@vdm.io", description="A Python package to retrieving Bible references with ease.", diff --git a/src/getbible/getbible.py b/src/getbible/getbible.py index daf5a0b..f0539c4 100644 --- a/src/getbible/getbible.py +++ b/src/getbible/getbible.py @@ -28,7 +28,7 @@ class GetBible: self.__chapters_cache = {} self.__start_cache_reset_thread() # Pattern to check valid translations names - self.__pattern = re.compile(r'^[a-zA-Z0-9]{1,30}$') + self.__pattern = re.compile(r'[a-zA-Z0-9]{1,30}') # Determine if the repository path is a URL self.__repo_path_url = self.__repo_path.startswith("http://") or self.__repo_path.startswith("https://") diff --git a/tests/test_getbible.py b/tests/test_getbible.py index 735cd80..2858ccc 100644 --- a/tests/test_getbible.py +++ b/tests/test_getbible.py @@ -67,7 +67,7 @@ class TestGetBible(unittest.TestCase): self.assertEqual(actual_result, expected_result, "Failed to find 'Ge1:1;Jn1:1;1Jn1:1' scripture.") def test_valid_multiple_reference_select_aleppo(self): - actual_result = self.getbible.select('Ge1:1-3;Ps1:1;ps1:1-2;Ge1:6-7,10', 'aleppo') + actual_result = self.getbible.select('ברא 1:1-3;תה 1:1;תה1:1-2;בְּרֵאשִׁית 1:6-7,10', 'aleppo') expected_result = { 'aleppo_19_1': {'abbreviation': 'aleppo', 'book_name': 'תְּהִלִּים', @@ -79,7 +79,7 @@ class TestGetBible(unittest.TestCase): 'language': 'Hebrew', 'name': 'תְּהִלִּים 1', 'translation': 'Aleppo Codex', - 'ref': ['Ps1:1', 'ps1:1-2'], + 'ref': ['תה 1:1', 'תה1:1-2'], 'verses': [{'chapter': 1, 'name': 'תְּהִלִּים 1:1', 'text': '\xa0\xa0אשרי האיש— \xa0\xa0 אשר לא הלך ' @@ -101,7 +101,7 @@ class TestGetBible(unittest.TestCase): 'language': 'Hebrew', 'name': 'בְּרֵאשִׁית 1', 'translation': 'Aleppo Codex', - 'ref': ['Ge1:1-3', 'Ge1:6-7,10'], + 'ref': ['ברא 1:1-3', 'בְּרֵאשִׁית 1:6-7,10'], 'verses': [{'chapter': 1, 'name': 'בְּרֵאשִׁית 1:1', 'text': 'בראשית ברא אלהים את השמים ואת הארץ ',