forked from openlp/openlp
Improved the regex to check dot after book number and after book name.
This commit is contained in:
parent
dd603f6486
commit
dae544abc1
@ -230,7 +230,7 @@ def update_reference_separators():
|
||||
REFERENCE_MATCHES['range_separator'] = re.compile(REFERENCE_SEPARATORS['sep_l'], re.UNICODE)
|
||||
# full reference match: <book>(<range>(,(?!$)|(?=$)))+
|
||||
REFERENCE_MATCHES['full'] = \
|
||||
re.compile('^\s*(?!\s)(?P<book>[\d]*[^\d]+)(?<!\s)\s*'
|
||||
re.compile('^\s*(?!\s)(?P<book>[\d]*[.]?[^\d\.]+)\.*(?<!\s)\s*'
|
||||
'(?P<ranges>(?:%(range_regex)s(?:%(sep_l)s(?!\s*$)|(?=\s*$)))+)\s*$'
|
||||
% dict(list(REFERENCE_SEPARATORS.items()) + [('range_regex', range_regex)]), re.UNICODE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user