Skip to main content

Module text_options

Module text_options 

Source
Expand description

Opt-ins for the two flowing export formats.

Plain text and Markdown have no page geometry and no typography, so unlike 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.

Structs§

MarkdownExportOptions
PlainTextExportOptions

Constants§

FORM_FEED
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.
HTML_PAGE_BREAK_STYLE
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.

Functions§

markdown_page_break
A raw HTML block standing in for a page break in Markdown.