Revert "Make page-break not configurable"

This reverts commit 0eb23efd44.
This commit is contained in:
Daniel Morawetz 2022-01-17 18:03:52 +01:00
parent 9acc0debec
commit 7b1241d0f2
No known key found for this signature in database
GPG Key ID: 0608A7C8F460343D
2 changed files with 7 additions and 2 deletions

View File

@ -592,11 +592,16 @@ impl HtmlConfig {
pub struct Print {
/// Whether print support is enabled.
pub enable: bool,
/// Insert page breaks between chapters. Default: `true`.
pub page_break: bool,
}
impl Default for Print {
fn default() -> Self {
Self { enable: true }
Self {
enable: true,
page_break: true,
}
}
}

View File

@ -56,7 +56,7 @@ impl HtmlHandlebars {
let fixed_content =
utils::render_markdown_with_path(&ch.content, ctx.html_config.curly_quotes, Some(path));
if !ctx.is_index {
if !ctx.is_index && ctx.html_config.print.page_break {
// Add page break between chapters
// See https://developer.mozilla.org/en-US/docs/Web/CSS/break-before and https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-before
// Add both two CSS properties because of the compatibility issue