forked from openlp/openlp
Made literal string to constant.
This commit is contained in:
parent
7d78b8f987
commit
017366c484
@ -45,6 +45,8 @@ import upgrade
|
|||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
RESERVED_CHARACTERS = u'\\.^$*+?{}[]()'
|
||||||
|
|
||||||
class BibleMeta(BaseModel):
|
class BibleMeta(BaseModel):
|
||||||
"""
|
"""
|
||||||
Bible Meta Data
|
Bible Meta Data
|
||||||
@ -372,7 +374,7 @@ class BibleDB(QtCore.QObject, Manager):
|
|||||||
book_names = BibleStrings().BookNames
|
book_names = BibleStrings().BookNames
|
||||||
# escape reserved characters
|
# escape reserved characters
|
||||||
book_escaped = book
|
book_escaped = book
|
||||||
for character in u'\\.^$*+?{}[]()':
|
for character in RESERVED_CHARACTERS:
|
||||||
book_escaped = book_escaped.replace(
|
book_escaped = book_escaped.replace(
|
||||||
character, u'\\' + character)
|
character, u'\\' + character)
|
||||||
regex_book = re.compile(u'\s*%s\s*' % u'\s*'.join(
|
regex_book = re.compile(u'\s*%s\s*' % u'\s*'.join(
|
||||||
|
Loading…
Reference in New Issue
Block a user