mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 12:05:52 +00:00
Add squeeze_empty_lines to PrettyPrinter
This commit is contained in:
parent
c36ed32816
commit
0c7e5299bf
@ -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…
x
Reference in New Issue
Block a user