From dd603f6486c51bf4b747e08c4ab53c73bd82b517 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Sun, 4 Jun 2017 23:40:18 +0300 Subject: [PATCH] Fixed the issue where books with "." can't be used in reference search. --- openlp/plugins/bibles/lib/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/bibles/lib/__init__.py b/openlp/plugins/bibles/lib/__init__.py index e4025411c..14db1e711 100644 --- a/openlp/plugins/bibles/lib/__init__.py +++ b/openlp/plugins/bibles/lib/__init__.py @@ -230,7 +230,7 @@ def update_reference_separators(): REFERENCE_MATCHES['range_separator'] = re.compile(REFERENCE_SEPARATORS['sep_l'], re.UNICODE) # full reference match: ((,(?!$)|(?=$)))+ REFERENCE_MATCHES['full'] = \ - re.compile('^\s*(?!\s)(?P[\d]*[^\d\.]+)\.*(?[\d]*[^\d]+)(?(?:%(range_regex)s(?:%(sep_l)s(?!\s*$)|(?=\s*$)))+)\s*$' % dict(list(REFERENCE_SEPARATORS.items()) + [('range_regex', range_regex)]), re.UNICODE) @@ -326,7 +326,7 @@ def parse_reference(reference, bible, language_selection, book_ref_id=False): ``^\s*(?!\s)(?P[\d]*[^\d]+)(?(?:%(range_regex)s(?:%(sep_l)s(?!\s*$)|(?=\s*$)))+)\s*$`` The second group contains all ``ranges``. This can be multiple declarations of range_regex separated by a list