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:
parent
f2cb601c11
commit
3ea0f9b745
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue