Skip to content

Commit

Permalink
Merge pull request #2264 from laws-africa/refs-subtype
Browse files Browse the repository at this point in the history
Refs subtype
  • Loading branch information
goose-life authored Oct 17, 2024
2 parents 732b06b + 7c63a96 commit 542ae91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion indigo/analysis/refs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def setup_subtypes(self):
(?P<ref>
\b(?P<subtype>{subtypes_string})\s*
([nN]o\.?\s*)?
(?P<num>[a-z0-9-]+)
(?P<num>[a-zA-Z0-9-]+)
(\s+of\s+|/)
(?P<year>\d{{4}})
)
Expand Down
2 changes: 2 additions & 0 deletions indigo/tests/test_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_find_simple(self):
<paragraph eId="sec_1.paragraph-0">
<content>
<p>Something to do with GN no 102 of 2012.</p>
<p>Something to do with Government Notice R184 of 1995.</p>
<p>And another thing about SI 4a of 1998.</p>
<p>don't match lowercase gn no 102 of 2012.</p>
<p>don't match where it's at the end of somethign no 102 of 2012.</p>
Expand All @@ -52,6 +53,7 @@ def test_find_simple(self):
<paragraph eId="sec_1.paragraph-0">
<content>
<p>Something to do with <ref href="/akn/za/act/gn/2012/102">GN no 102 of 2012</ref>.</p>
<p>Something to do with <ref href="/akn/za/act/gn/1995/r184">Government Notice R184 of 1995</ref>.</p>
<p>And another thing about <ref href="/akn/za/act/si/1998/4a">SI 4a of 1998</ref>.</p>
<p>don't match lowercase gn no 102 of 2012.</p>
<p>don't match where it's at the end of somethign no 102 of 2012.</p>
Expand Down

0 comments on commit 542ae91

Please sign in to comment.