Consider all matches, not just exact matches

This commit is contained in:
Edward Betts 2023-12-09 18:45:19 +00:00
parent ba56274022
commit b76a6707f2

View file

@ -289,8 +289,8 @@ def get_best_hit(title: str, hits: list[Hit]) -> tuple[Hit, dict[str, typing.Any
for hit in hits:
if hit["title"].lower() == title.lower():
continue
if match_type(title, hit["snippet"]) != "exact":
continue
# if match_type(title, hit["snippet"]) != "exact":
# continue
try:
print(f'get diff: {hit["title"]}, {title}')