pub struct PlainTextExportOptions {
pub quote_indent: bool,
pub page_breaks: bool,
pub strip_images: bool,
pub endnote_footnotes: bool,
}Fields§
§quote_indent: boolIndent blockquoted blocks four spaces per level, so quoted matter still reads as set-off in a format with no markup to say so.
page_breaks: boolEmit FORM_FEED before a block that asks to start a new page.
strip_images: boolDrop the U+FFFC that stands for an inline image.
Presentation only. A written-out .txt has no way to show a picture,
and the raw sentinel renders as an unmarked box — but it is also one
character of the document, so removing it shifts every offset after it.
Anything that addresses the text by position (a cursor, a search hit, a
comment’s anchor) must therefore leave it in, which is exactly the
difference between Self::addressable and Self::presentation.
endnote_footnotes: boolLift footnotes out of the flow and list them, numbered, at the end.
Presentation only, and for exactly the reason strip_images is. A
note’s body is real content in the document, sitting in the rope where
its definition was written, and the addressable view has to agree with
the document character for character. Moving those blocks to the end —
or worse, printing them twice — puts every offset after them wrong,
which is every search hit and every comment anchor below the note.
A written-out .txt has no page to put a footnote at the foot of, so
the endnote list is what a manuscript printed without markup has always
done.
Implementations§
Source§impl PlainTextExportOptions
impl PlainTextExportOptions
Sourcepub const fn addressable() -> Self
pub const fn addressable() -> Self
Nothing added — the addressable view, pinned to the document’s own search text. Offsets into it are offsets into the document, character for character.
Sourcepub const fn presentation() -> Self
pub const fn presentation() -> Self
Everything a written-out .txt wants.
Trait Implementations§
Source§impl Clone for PlainTextExportOptions
impl Clone for PlainTextExportOptions
Source§fn clone(&self) -> PlainTextExportOptions
fn clone(&self) -> PlainTextExportOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more