Skip to content

Commit

Permalink
fix: remove negative score from prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
BoYanZh committed Oct 31, 2024
1 parent f911eac commit 249b8eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions joint_teapot/utils/joj3.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ def check_skipped(score_file_path: str, keyword: str) -> bool:


def get_title_prefix(title: str) -> str:
meet_negative = False
for i in range(len(title) - 1, -1, -1):
if not title[i].isdigit() and not title[i].isspace():
if not meet_negative and title[i] == "-":
meet_negative = True
continue
return title[: i + 1]
return ""

0 comments on commit 249b8eb

Please sign in to comment.