mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Do not export syntax_set and theme_set
This commit is contained in:
1 parent
fc1ca0875a
commit
62f2d0c100
3 files changed
+12
-5
No files matched your search
+10
-2
@@ -15,8 +15,8 @@ pub const BAT_THEME_DEFAULT: &str = "Monokai Extended";
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct HighlightingAssets {
|
||||
pub syntax_set: SyntaxSet,
|
||||
pub theme_set: ThemeSet,
|
||||
pub(crate) syntax_set: SyntaxSet,
|
||||
pub(crate) theme_set: ThemeSet,
|
||||
}
|
||||
|
||||
impl HighlightingAssets {
|
||||
@@ -138,6 +138,14 @@ impl HighlightingAssets {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn syntaxes(&self) -> &[SyntaxReference] {
|
||||
self.syntax_set.syntaxes()
|
||||
}
|
||||
|
||||
pub fn themes(&self) -> &BTreeMap<String, Theme> {
|
||||
&self.theme_set.themes
|
||||
}
|
||||
|
||||
pub fn get_theme(&self, theme: &str) -> &Theme {
|
||||
match self.theme_set.themes.get(theme) {
|
||||
Some(theme) => theme,
|
||||
|
||||
Reference in new issue
Block a user