2
0
mirror of https://github.com/xvxx/phetch synced 2024-11-05 00:00:58 +00:00

render \t as 4 spaces

This commit is contained in:
dvkt 2020-01-02 14:25:08 -08:00
parent b94f612bc1
commit 05280c350c

View File

@ -116,8 +116,8 @@ impl View for Text {
out.push_str(&indent);
line_size += indent.len();
}
let line = line.trim_end();
out.push_str(line);
let line = line.trim_end_matches('\r').replace('\t', " ");
out.push_str(&line);
line_size += line.len();
// clear rest of line