From 3ea0f9b745ba22a92f10802b9d3505a87c993f5b Mon Sep 17 00:00:00 2001 From: Ricky Date: Tue, 5 Nov 2019 07:55:08 -0500 Subject: [PATCH] Lowercase matching the theme name (#1079) * Using .to_lowercase() on the theme matching to avoid needed exact capitolization in the book.toml * Changed the default-dark-theme from .to_string() to .to_lowercase() to match theme --- src/renderer/html_handlebars/hbs_renderer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index 27d9f610..e8173770 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -407,13 +407,13 @@ fn make_data( } let default_theme = match html_config.default_theme { - Some(ref theme) => theme, - None => "light", + Some(ref theme) => theme.to_lowercase(), + None => "light".to_string(), }; data.insert("default_theme".to_owned(), json!(default_theme)); let preferred_dark_theme = match html_config.preferred_dark_theme { - Some(ref theme) => theme, + Some(ref theme) => theme.to_lowercase(), None => default_theme, }; data.insert(