Remove duplicate call to load syntax/themes

This commit is contained in:
Vincent Prouillet 2021-09-13 21:13:51 +02:00
parent 23064f57c8
commit 2e884e06cb
2 changed files with 1 additions and 2 deletions

View File

@ -71,7 +71,7 @@ impl Markdown {
}
/// 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)
.as_ref()
.and_then(|ts| ts.themes.get(theme_name))

View File

@ -73,7 +73,6 @@ impl Site {
let path = path.as_ref();
let config_file = config_file.as_ref();
let mut config = get_config(config_file)?;
config.markdown.load_extra_syntaxes_and_highlight_themes(path)?;
if let Some(theme) = config.theme.clone() {
// Grab data from the extra section of the theme