mirror of
https://github.com/sharkdp/bat
synced 2024-11-23 20:33:06 +00:00
Add squeeze_empty_lines to PrettyPrinter
This commit is contained in:
parent
c36ed32816
commit
0c7e5299bf
1 changed files with 7 additions and 0 deletions
|
@ -230,6 +230,13 @@ impl<'a> PrettyPrinter<'a> {
|
||||||
self
|
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
|
/// Specify the highlighting theme
|
||||||
pub fn theme(&mut self, theme: impl AsRef<str>) -> &mut Self {
|
pub fn theme(&mut self, theme: impl AsRef<str>) -> &mut Self {
|
||||||
self.config.theme = theme.as_ref().to_owned();
|
self.config.theme = theme.as_ref().to_owned();
|
||||||
|
|
Loading…
Reference in a new issue