Render tabs with 8 spaces (previously 4)

Most web UIs seem to do this (e.g. on GitHub), and C code from the
Linux kernel assumes 8 spaces in a tab when aligning things.
pull/261/head
Wilfred Hughes 2022-04-17 20:13:53 +07:00
parent 4163657682
commit 34fd5ba7eb
2 changed files with 4 additions and 2 deletions

@ -17,6 +17,8 @@ Improved performance in large files when changes are clustered together.
Improved syntax highlighting for keywords.
Tabs are now rendered with eight spaces.
### Command Line Interface
Difftastic now validates environment variables the same way as

@ -246,10 +246,10 @@ fn diff_file_content(
// TODO: don't replace tab characters inside string literals.
let mut lhs_src = String::from_utf8_lossy(lhs_bytes)
.to_string()
.replace('\t', " ");
.replace('\t', " ");
let mut rhs_src = String::from_utf8_lossy(rhs_bytes)
.to_string()
.replace('\t', " ");
.replace('\t', " ");
// Ignore the trailing newline, if present.
// TODO: highlight if this has changes (#144).