Skip to content

Commit

Permalink
Allow '+' sign in division tags n attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
andredelft committed Jul 28, 2021
1 parent b62e5f4 commit cda26d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion leidenmark/divisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class DivisionsPreproc(Preprocessor):
RE_OPEN = re.compile(
r"""
(?:
<D=\.(\w+)(?:\.(\w+))? # Division mark
<D=\.([\w\+]+)(?:\.(\w+))? # Division mark
# <D=.number(.divisontype)? ... =D>
|(<=)(?!\.(?:ms|lb|cb|pb|gb)) # Paragraph mark <= ... =>
# (Check if it is not a milestone)
Expand Down
5 changes: 5 additions & 0 deletions tests/divisions_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from leidenmark import leiden_plus


def test_divisions():
assert leiden_plus('<D=.1_2+3.fragment Test =D>') == '<div n="1_2+3" subtype="fragment" type="textpart">Test</div>'

0 comments on commit cda26d8

Please sign in to comment.