forked from openlp/openlp
removed white spaces
This commit is contained in:
parent
8dcf868827
commit
52a465b90a
@ -77,9 +77,9 @@ def parse_reference(reference):
|
|||||||
- After a verse reference all further single values are treat as verse in
|
- After a verse reference all further single values are treat as verse in
|
||||||
the last selected chapter.
|
the last selected chapter.
|
||||||
``John 3:16-18`` refers to John chapter 3 verses 16 to 18
|
``John 3:16-18`` refers to John chapter 3 verses 16 to 18
|
||||||
- After a list separator it is possible to refer to additional verses. They
|
- After a list separator it is possible to refer to additional verses. They
|
||||||
are build analog to the first ones. This way it is possible to define
|
are build analog to the first ones. This way it is possible to define each
|
||||||
each number of verse references. It is not possible to refer to verses in
|
number of verse references. It is not possible to refer to verses in
|
||||||
additional books.
|
additional books.
|
||||||
``John 3:16,18`` refers to John chapter 3 verses 16 and 18
|
``John 3:16,18`` refers to John chapter 3 verses 16 and 18
|
||||||
``John 3:16-18,20`` refers to John chapter 3 verses 16 to 18 and 20
|
``John 3:16-18,20`` refers to John chapter 3 verses 16 to 18 and 20
|
||||||
@ -105,15 +105,15 @@ def parse_reference(reference):
|
|||||||
5. ``(?P<to_verse>[0-9]+)``
|
5. ``(?P<to_verse>[0-9]+)``
|
||||||
The ``to_verse`` reference is equivalent to group 2.
|
The ``to_verse`` reference is equivalent to group 2.
|
||||||
|
|
||||||
The full reference is matched against get_reference_match(u'full'). This
|
The full reference is matched against get_reference_match(u'full'). This
|
||||||
regular expression looks like this:
|
regular expression looks like this:
|
||||||
|
|
||||||
1. ``^\s*(?!\s)(?P<book>[\d]*[^\d]+)(?<!\s)\s*``
|
1. ``^\s*(?!\s)(?P<book>[\d]*[^\d]+)(?<!\s)\s*``
|
||||||
The ``book`` group starts with the first non-whitespace character. There
|
The ``book`` group starts with the first non-whitespace character. There
|
||||||
are optional leading digits followed by non-digits. The group ends
|
are optional leading digits followed by non-digits. The group ends
|
||||||
before the whitspace in front of the next digit.
|
before the whitspace in front of the next digit.
|
||||||
2. ``(?P<ranges>(?:`` + range_string + ``(?:%(sep_l)s|(?=\s*$)))+)\s*$``
|
2. ``(?P<ranges>(?:`` + range_string + ``(?:%(sep_l)s|(?=\s*$)))+)\s*$``
|
||||||
The second group contains all ``ranges``. This can be multiple
|
The second group contains all ``ranges``. This can be multiple
|
||||||
declarations of a range_string separated by a list separator.
|
declarations of a range_string separated by a list separator.
|
||||||
|
|
||||||
The reference list is a list of tuples, with each tuple structured like
|
The reference list is a list of tuples, with each tuple structured like
|
||||||
|
Loading…
Reference in New Issue
Block a user