diff --git a/src/autolink_references/main.py b/src/autolink_references/main.py index 4bf5cb0..e464f80 100755 --- a/src/autolink_references/main.py +++ b/src/autolink_references/main.py @@ -7,11 +7,11 @@ def replace_autolink_references(markdown, ref_prefix, target_url): if "" not in ref_prefix: ref_prefix = ref_prefix + "" find_regex = re.compile( - r"(?", r"(?P[-\w]+)") + r"(?", r"(?P[-\w]+)"), re.IGNORECASE ) linked_ref = rf"[{ref_prefix}](" + target_url + r")" replace_text = linked_ref.replace(r"", r"\g") - markdown = re.sub(find_regex, replace_text, markdown, re.IGNORECASE) + markdown = re.sub(find_regex, replace_text, markdown) return markdown