From 2e884e06cb5c9e9652450ffc9caafe91ea0d3e88 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 13 Sep 2021 21:13:51 +0200 Subject: [PATCH] Remove duplicate call to load syntax/themes --- components/config/src/config/markup.rs | 2 +- components/site/src/lib.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/config/src/config/markup.rs b/components/config/src/config/markup.rs index 5396b2db..f92b8ed2 100644 --- a/components/config/src/config/markup.rs +++ b/components/config/src/config/markup.rs @@ -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)) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index e86cd166..10c8a05c 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -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