Skip to content

Commit 7b3e697

Browse files
authored
Merge pull request #2795 from ehuss/remove-theme-option
Remove theme_option
2 parents 3236ec0 + 9fce4ad commit 7b3e697

File tree

4 files changed

+1
-43
lines changed

4 files changed

+1
-43
lines changed

crates/mdbook-html/src/html_handlebars/hbs_renderer.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ impl HtmlHandlebars {
271271
no_section_label: html_config.no_section_label,
272272
}),
273273
);
274-
// TODO: remove theme_option in 0.5, it is not needed.
275-
handlebars.register_helper("theme_option", Box::new(helpers::theme::theme_option));
276274
}
277275

278276
fn emit_redirects(
@@ -558,7 +556,6 @@ fn make_data(
558556
);
559557
}
560558

561-
// TODO: remove default_theme in 0.5, it is not needed.
562559
let default_theme = match html_config.default_theme {
563560
Some(ref theme) => theme.to_lowercase(),
564561
None => "light".to_string(),
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
pub(crate) mod resources;
2-
pub(crate) mod theme;
32
pub(crate) mod toc;

crates/mdbook-html/src/html_handlebars/helpers/resources.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl HelperDef for ResourceHelper {
2323
) -> Result<(), RenderError> {
2424
let param = h.param(0).and_then(|v| v.value().as_str()).ok_or_else(|| {
2525
RenderErrorReason::Other(
26-
"Param 0 with String type is required for theme_option helper.".to_owned(),
26+
"Param 0 with String type is required for resource helper.".to_owned(),
2727
)
2828
})?;
2929

crates/mdbook-html/src/html_handlebars/helpers/theme.rs

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)