prevent page break in code blocks + force wrap in pre tags (because you can't scroll...)
This commit is contained in:
parent
d03ae79765
commit
82a774c90e
|
@ -137,6 +137,7 @@ impl Renderer for HtmlHandlebars {
|
|||
let rendered = try!(handlebars.render("index", &data));
|
||||
let mut file = try!(utils::create_file(&book.get_dest().join("print").with_extension("html")));
|
||||
try!(file.write_all(&rendered.into_bytes()));
|
||||
output!("[*] Creating print.html ✓");
|
||||
|
||||
// Copy static files (js, css, images, ...)
|
||||
|
||||
|
|
|
@ -296,4 +296,13 @@ html, body {
|
|||
page-break-after: avoid;
|
||||
/*break-after: avoid;*/
|
||||
}
|
||||
|
||||
pre, code {
|
||||
page-break-inside: avoid;
|
||||
white-space: pre-wrap; /* CSS 3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue