1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-16 10:12:26 +01:00

Add --squeeze-limit to specify max number of consecutive empty lines

Co-authored-by: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com>
This commit is contained in:
Ethan P
2020-12-16 18:23:14 -08:00
committed by einfachIrgendwer0815
parent 0c7e5299bf
commit 0e4e10edb6
5 changed files with 18 additions and 7 deletions

View File

@@ -231,8 +231,7 @@ impl<'a> PrettyPrinter<'a> {
}
/// Specify the maximum number of consecutive empty lines to print.
/// If set to `0`, all empty lines will be shown.
pub fn squeeze_empty_lines(&mut self, maximum: usize) -> &mut Self {
pub fn squeeze_empty_lines(&mut self, maximum: Option<usize>) -> &mut Self {
self.config.squeeze_lines = maximum;
self
}