mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-09 15:55:10 +02:00
Simpler highlight method
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/// A program that prints its own source code using the bat library
|
||||
use bat::{LineRange, PagingMode, PrettyPrinter, WrappingMode};
|
||||
use bat::{PagingMode, PrettyPrinter, WrappingMode};
|
||||
|
||||
fn main() {
|
||||
PrettyPrinter::new()
|
||||
@ -8,7 +8,7 @@ fn main() {
|
||||
.line_numbers(true)
|
||||
.use_italics(true)
|
||||
// The following line will be highlighted in the output:
|
||||
.highlight(LineRange::new(line!() as usize, line!() as usize))
|
||||
.highlight(line!() as usize)
|
||||
.theme("1337")
|
||||
.wrapping_mode(WrappingMode::Character)
|
||||
.paging_mode(PagingMode::QuitIfOneScreen)
|
||||
|
Reference in New Issue
Block a user