2
0
mirror of https://github.com/xvxx/phetch synced 2024-11-15 00:12:50 +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); out.push_str(&indent);
line_size += indent.len(); line_size += indent.len();
} }
let line = line.trim_end(); let line = line.trim_end_matches('\r').replace('\t', " ");
out.push_str(line); out.push_str(&line);
line_size += line.len(); line_size += line.len();
// clear rest of line // clear rest of line