Add squeeze_empty_lines to PrettyPrinter

pull/2665/head
Ethan P 3 years ago committed by einfachIrgendwer0815
parent c36ed32816
commit 0c7e5299bf
No known key found for this signature in database
GPG Key ID: 58D55E5F117DA873

@ -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();

Loading…
Cancel
Save