This commit is contained in:
Paul Gauthier 2023-06-09 14:32:45 -07:00
parent e4d9e71f5b
commit 490796de78

View file

@ -59,10 +59,18 @@ def try_dotdotdots(whole, part, replace):
return whole
def replace_part_with_missing_leading_whitespace(whole, part, replace):
pass
def replace_most_similar_chunk(whole, part, replace):
if part in whole:
return whole.replace(part, replace)
res = replace_part_with_missing_leading_whitespace(whole, part, replace)
if res:
return res
try:
res = try_dotdotdots(whole, part, replace)
except ValueError: