From acde9cad5ece985b7d9a44922cd181af7b6b5478 Mon Sep 17 00:00:00 2001 From: suutari-olli Date: Sun, 15 May 2016 18:04:15 +0300 Subject: [PATCH] - Fixed the dot chechk method. (No longer removes dot after numbers, eg. 1.) --- openlp/plugins/bibles/lib/manager.py | 2 +- openlp/plugins/bibles/lib/mediaitem.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index b051978ae..4b81c1493 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -24,7 +24,7 @@ import logging import os from openlp.core.common import RegistryProperties, AppLocation, Settings, translate, delete_file, UiStrings -from openlp.plugins.bibles.lib import parse_reference, get_reference_separator, LanguageSelection +from openlp.plugins.bibles.lib import parse_reference, LanguageSelection from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta from .csvbible import CSVBible from .http import HTTPBible diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 6bbfb7873..99e16bafa 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -667,10 +667,10 @@ class BibleMediaItem(MediaManagerItem): # Set Bibles to use the text input from Quick search field. bible = self.quickVersionComboBox.currentText() second_bible = self.quickSecondComboBox.currentText() - # Get input from field and replace '. ' with '' - # This will check if field has any '.' and removes them. Eg. Gen. 1 = Gen 1 = Genesis 1 + # Get input from field and replace 'A-Z + . ' with '' + # This will check if field has any '.' after A-Z and removes them. Eg. Gen. 1 = Gen 1 = Genesis 1 text = self.quick_search_edit.text() - text = text.replace('. ', ' ') + text = re.sub('\D[.]\s', ' ', text) # This is triggered on reference search, use the search from manager.py if self.quick_search_edit.current_search_type() != BibleSearch.Text: self.search_results = self.plugin.manager.get_verses(bible, text)