Skip to content

Commit

Permalink
Lowercase matching the theme name (#1079)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
deg4uss3r authored and Dylan-DPC committed Nov 5, 2019
1 parent f2cb601 commit 3ea0f9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderer/html_handlebars/hbs_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 3ea0f9b

Please sign in to comment.