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 PandeinfachIrgendwer0815 authored and einfachIrgendwer0815 committed 2024-02-24 13:51:06 +01:00
1 parent 0c7e5299bf
commit 0e4e10edb6
5 files changed
+18 -7

No files matched your search

+1 -2
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
}