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
This commit is contained in:
Ricky 2019-11-05 07:55:08 -05:00 committed by Dylan DPC
parent f2cb601c11
commit 3ea0f9b745
1 changed files with 3 additions and 3 deletions

View File

@ -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(