Skip to content

Commit c7c5831

Browse files
committed
prevent div by zero in cit common phase %; comparing to whitespace
1 parent ed1968a commit c7c5831

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/academic_tracker/helper_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ def _compute_common_phrase_percent(prev_citation, new_citation, characters_to_re
673673
"""
674674
if prev_citation and new_citation:
675675
citation_strip_regex = "|".join([f"\{char}" for char in characters_to_remove])
676-
# citation_strip_regex_old = r"\.|,|;|\(|\)|\[|\]|\{|\}"
676+
# citation_strip_regex = r"\.|,|;|\(|\)|\[|\]|\{|\}"
677677
stripped_prev_citation = re.sub(citation_strip_regex, "", prev_citation.lower())
678678
stripped_new_citation = re.sub(citation_strip_regex, "", new_citation.lower())
679679

0 commit comments

Comments
 (0)