diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pretty_printer.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pretty_printer.rs b/src/pretty_printer.rs index 121637f1..614f0c91 100644 --- a/src/pretty_printer.rs +++ b/src/pretty_printer.rs @@ -230,6 +230,13 @@ impl<'a> PrettyPrinter<'a> { self } + /// 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 { + self.config.squeeze_lines = maximum; + self + } + /// Specify the highlighting theme pub fn theme(&mut self, theme: impl AsRef<str>) -> &mut Self { self.config.theme = theme.as_ref().to_owned(); |