mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 19:32:25 +01:00
replace_nonprintable: Keep \n around
Since it has a functional role, we can not just replace it, we must keep it around. This also allows us to simplify the code slightly. We must fix this before we fix #1438 since otherwise the \n will be missing with --style=plain, since we will stop adding it if it is missing.
This commit is contained in:
@@ -72,7 +72,7 @@ pub fn replace_nonprintable(input: &[u8], tab_width: usize) -> String {
|
||||
}
|
||||
}
|
||||
// line feed
|
||||
'\x0A' => output.push('␊'),
|
||||
'\x0A' => output.push_str("␊\x0A"),
|
||||
// carriage return
|
||||
'\x0D' => output.push('␍'),
|
||||
// null
|
||||
|
Reference in New Issue
Block a user