1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//! Opt-ins for the two *flowing* export formats.
//!
//! Plain text and Markdown have no page geometry and no typography, so unlike
//! [`DocxExportOptions`](super::DocxExportOptions) and its siblings these carry nothing but a
//! handful of presentation choices — the things a **file being written out** wants and a
//! string being computed against does not.
//!
//! Both default to *off*, and that default is load-bearing rather than merely conservative:
//! `to_plain_text()` is pinned character-for-character to the document's addressable text, the
//! text `find_all`/`replace_text` compute offsets against. Anything that inserts or indents
//! shifts every offset after it and silently desynchronises search from the document. So the
//! plain view stays plain, and only a caller writing a file asks for the rest.
use ;
/// The CSS3 property and its CSS2 predecessor, both, because reading systems and print
/// engines are still split between them. Shared with the HTML writer so the two formats
/// cannot drift apart on what a page break looks like.
pub const HTML_PAGE_BREAK_STYLE: &str = "break-before: page; page-break-before: always;";
/// A raw HTML block standing in for a page break in Markdown.
///
/// Markdown has no page-break construct — not in CommonMark, not in any widely-implemented
/// extension. Of the three conventions in the wild (a bare `U+000C`, an HTML-comment sentinel
/// a toolchain greps for, and this) only this one *does* anything without a bespoke
/// processor: it survives Pandoc's reader as raw HTML, reaches HTML output intact, and is
/// honoured by browser and EPUB print engines. It renders as nothing on screen.
/// U+000C FORM FEED — what a page break has meant in a text file since line printers, and
/// still what `pr`, `less` and most terminal pagers act on.
pub const FORM_FEED: char = '\u{000C}';