bat/src/lib.rs

39 lines
927 B
Rust
Raw Normal View History

/// `bat` is a library to print syntax highlighted content.
///
/// ```
/// use bat::PrettyPrinter;
///
/// PrettyPrinter::new()
/// .input_from_bytes(b"<span style=\"color: #ff00cc\">Hello world!</span>\n")
/// .language("html")
/// .run()
/// .expect("no errors");
/// ```
pub mod assets;
pub mod assets_metadata;
2020-03-21 19:40:13 +01:00
pub mod config;
pub mod controller;
2019-10-20 22:09:58 +02:00
mod decorations;
mod diff;
2020-03-21 19:35:04 +01:00
pub mod errors;
2020-04-22 16:27:34 +02:00
pub mod input;
mod less;
2020-03-21 21:03:57 +01:00
pub(crate) mod line_range;
2019-10-29 19:46:04 +01:00
mod output;
2019-10-20 22:09:58 +02:00
mod preprocessor;
pub mod pretty_printer;
2020-03-21 21:15:12 +01:00
pub(crate) mod printer;
2020-03-21 21:03:57 +01:00
pub(crate) mod style;
pub(crate) mod syntax_mapping;
2019-10-20 22:09:58 +02:00
mod terminal;
2020-03-21 21:03:57 +01:00
pub(crate) mod wrap;
2020-03-21 21:15:12 +01:00
pub use line_range::{HighlightedLineRanges, LineRange, LineRanges};
pub use pretty_printer::PrettyPrinter;
pub use style::{StyleComponent, StyleComponents};
pub use syntax_mapping::{MappingTarget, SyntaxMapping};
pub use wrap::WrappingMode;
#[cfg(feature = "paging")]
pub use config::PagingMode;