commit
e6568a70eb
|
@ -45,6 +45,12 @@ impl HtmlHandlebars {
|
|||
ctx.html_config.curly_quotes,
|
||||
Some(&path),
|
||||
);
|
||||
if !ctx.is_index {
|
||||
// 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
|
||||
print_content.push_str(r#"<div id="chapter_begin" style="break-before: page; page-break-before: always;"></div>"#);
|
||||
}
|
||||
print_content.push_str(&fixed_content);
|
||||
|
||||
// Update the context with data for this file
|
||||
|
|
Loading…
Reference in New Issue