Display line-feed as instead of

This commit is contained in:
sharkdp authored and David Peter committed 2018-11-01 22:00:47 +01:00
1 parent 8fa8f44706
commit 50dc4a79b0
2 files changed
+5 -5

No files matched your search

@@ -13,8 +13,8 @@ contexts:
scope: constant.character.escape.show-nonprintable.tab scope: constant.character.escape.show-nonprintable.tab
- match: "↹" - match: "↹"
scope: constant.character.escape.show-nonprintable.tab scope: constant.character.escape.show-nonprintable.tab
- match: "␤" - match: "␊"
scope: keyword.operator.show-nonprintable.newline scope: keyword.operator.show-nonprintable.line-feed
- match: "␍" - match: "␍"
scope: string.show-nonprintable.carriage-return scope: string.show-nonprintable.carriage-return
- match: "␀" - match: "␀"
+3 -3
View File
@@ -52,10 +52,10 @@ pub fn replace_nonprintable(input: &mut Vec<u8>, output: &mut Vec<u8>, tab_width
output.extend_from_slice("┤".as_bytes()); output.extend_from_slice("┤".as_bytes());
} }
} }
// new line // line feed
b'\n' => output.extend_from_slice("␤".as_bytes()), 0x0A => output.extend_from_slice("␊".as_bytes()),
// carriage return // carriage return
b'\r' => output.extend_from_slice("␍".as_bytes()), 0x0D => output.extend_from_slice("␍".as_bytes()),
// null // null
0x00 => output.extend_from_slice("␀".as_bytes()), 0x00 => output.extend_from_slice("␀".as_bytes()),
// bell // bell