We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 536873c + 0eb23ef commit e6568a7Copy full SHA for e6568a7
src/renderer/html_handlebars/hbs_renderer.rs
@@ -45,6 +45,12 @@ impl HtmlHandlebars {
45
ctx.html_config.curly_quotes,
46
Some(&path),
47
);
48
+ if !ctx.is_index {
49
+ // Add page break between chapters
50
+ // 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
51
+ // Add both two CSS properties because of the compatibility issue
52
+ print_content.push_str(r#"<div id="chapter_begin" style="break-before: page; page-break-before: always;"></div>"#);
53
+ }
54
print_content.push_str(&fixed_content);
55
56
// Update the context with data for this file
0 commit comments