Spaces:
Sleeping
Sleeping
Commit ·
9ee8cbe
1
Parent(s): 271bf40
update regex for legis url replacement
Browse files
src/legisqa_local/utils/text.py
CHANGED
|
@@ -50,6 +50,6 @@ def legis_id_match_to_link(matchobj):
|
|
| 50 |
|
| 51 |
def replace_legis_ids_with_urls(text: str) -> str:
|
| 52 |
"""Replace legislation IDs in text with markdown links"""
|
| 53 |
-
pattern = "
|
| 54 |
rtext = re.sub(pattern, legis_id_match_to_link, text)
|
| 55 |
return rtext
|
|
|
|
| 50 |
|
| 51 |
def replace_legis_ids_with_urls(text: str) -> str:
|
| 52 |
"""Replace legislation IDs in text with markdown links"""
|
| 53 |
+
pattern = "1[12][3456789]-[a-z]+-\\d{1,5}"
|
| 54 |
rtext = re.sub(pattern, legis_id_match_to_link, text)
|
| 55 |
return rtext
|