Skip to content

Commit

Permalink
Add t1/t2/t3 to neutral citation regex
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-dxw committed Jun 26, 2024
1 parent a352b18 commit 4e064aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ds_caselaw_utils/data/neutral_citation_regex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[2, 4, 1, 3],
],
['^\[(\d{4})\] (EWFC|EWCOP) (\d+)$', [2, 1, 3]],
['^\[(\d{4})\] (EWCOP) (\d+) \((T1|T2|T3)\)$', [2, 4, 1, 3]],
['^\[(\d{4})\] (UKUT) (\d+) \((AAC|IAC|LC|TCC)\)$', [2, 4, 1, 3]],
['^\[(\d{4})\] (EAT) (\d+)$', [2, 1, 3]],
['^\[(\d{4})\] (UKFTT) (\d+) \((TC|GRC)\)$', [2, 4, 1, 3]],
Expand Down
1 change: 1 addition & 0 deletions src/ds_caselaw_utils/test_neutral.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def test_good_neutral_urls(self):
self.assertEqual(neutral_url("[2022] UKFTT 1 (GRC)"), "/ukftt/grc/2022/1")
self.assertEqual(neutral_url("[2022] EWHC 1 (KB)"), "/ewhc/kb/2022/1")
self.assertEqual(neutral_url("[2023] UKAIT 1"), "/ukait/2023/1")
self.assertEqual(neutral_url("[2024] EWCOP 17 (T2)"), "/ewcop/t2/2024/17")

def test_bad_neutral_urls(self):
self.assertEqual(neutral_url(""), None)
Expand Down

0 comments on commit 4e064aa

Please sign in to comment.