diff kitten: Render tabs as four spaces instead of <9>

This commit is contained in:
Kovid Goyal
2018-05-20 15:29:12 +05:30
parent b1b90d2bf7
commit 912b395316

View File

@@ -152,10 +152,13 @@ def data_for_path(path):
@lru_cache(maxsize=1024)
def lines_for_path(path):
data = data_for_path(path)
data = data_for_path(path).replace('\t', lines_for_path.replace_tab_by)
return tuple(sanitize(data).splitlines())
lines_for_path.replace_tab_by = ' ' * 4
@lru_cache(maxsize=1024)
def hash_for_path(path):
return md5(raw_data_for_path(path)).digest()