Skip to content

Commit 1888094

Browse files
deg4uss3rDylan-DPC
authored andcommitted
Lowercase matching the theme name (rust-lang#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
1 parent aeb09fd commit 1888094

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/renderer/html_handlebars/hbs_renderer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,13 @@ fn make_data(
407407
}
408408

409409
let default_theme = match html_config.default_theme {
410-
Some(ref theme) => theme,
411-
None => "light",
410+
Some(ref theme) => theme.to_lowercase(),
411+
None => "light".to_string(),
412412
};
413413
data.insert("default_theme".to_owned(), json!(default_theme));
414414

415415
let preferred_dark_theme = match html_config.preferred_dark_theme {
416-
Some(ref theme) => theme,
416+
Some(ref theme) => theme.to_lowercase(),
417417
None => default_theme,
418418
};
419419
data.insert(

0 commit comments

Comments
 (0)