Remove duplicate call to load syntax/themes
This commit is contained in:
parent
23064f57c8
commit
2e884e06cb
@ -71,7 +71,7 @@ impl Markdown {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Gets an arbitrary theme from the THEME_SET or the extra_theme_set
|
/// Gets an arbitrary theme from the THEME_SET or the extra_theme_set
|
||||||
pub fn get_highlight_theme_by_name<'config>(&'config self, theme_name: &str) -> &'config Theme {
|
pub fn get_highlight_theme_by_name(&self, theme_name: &str) -> &Theme {
|
||||||
(*self.extra_theme_set)
|
(*self.extra_theme_set)
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|ts| ts.themes.get(theme_name))
|
.and_then(|ts| ts.themes.get(theme_name))
|
||||||
|
@ -73,7 +73,6 @@ impl Site {
|
|||||||
let path = path.as_ref();
|
let path = path.as_ref();
|
||||||
let config_file = config_file.as_ref();
|
let config_file = config_file.as_ref();
|
||||||
let mut config = get_config(config_file)?;
|
let mut config = get_config(config_file)?;
|
||||||
config.markdown.load_extra_syntaxes_and_highlight_themes(path)?;
|
|
||||||
|
|
||||||
if let Some(theme) = config.theme.clone() {
|
if let Some(theme) = config.theme.clone() {
|
||||||
// Grab data from the extra section of the theme
|
// Grab data from the extra section of the theme
|
||||||
|
Loading…
Reference in New Issue
Block a user