pub struct DjotExportOptions {
pub alignment: bool,
pub line_height: bool,
pub direction: bool,
pub non_breakable_lines: bool,
pub page_break_before: bool,
pub background_color: bool,
pub top_margin: bool,
pub text_indent: bool,
pub semantic_role: bool,
pub omit_images: bool,
}Expand description
Selects which optional block attributes the djot exporter emits as
{key=value} block attributes. A disabled attribute is omitted from the
output even when the model carries a value for it.
Fields§
§alignment: boolEmit paragraph alignment as {alignment=…}.
line_height: boolEmit line height as {line_height=…}.
direction: boolEmit text direction as {direction=…}.
non_breakable_lines: boolEmit non-breakable lines as {non_breakable_lines=…}.
page_break_before: boolEmit “start on a new page” as {page_break_before=…}.
background_color: boolEmit block background color as {background_color=…}.
top_margin: boolEmit the block’s own space-above as {top_margin=…}.
text_indent: boolEmit the block’s own first-line indent as {text_indent=…}.
semantic_role: boolEmit the enclosing blockquote’s semantic role as {semantic_role=…} on the
quote’s first block, so the model→djot→model round trip stays a fixpoint.
omit_images: boolDrop inline images instead of emitting {width=… height=…}.
Unlike every other field here this one is not a block attribute and is
not governed by Self::all/Self::none: an image is content, not
styling, so “emit no optional attributes” must not quietly delete it.
Only a caller that has decided not to place the image files beside the
output turns it on.
Implementations§
Trait Implementations§
Source§impl Clone for DjotExportOptions
impl Clone for DjotExportOptions
Source§fn clone(&self) -> DjotExportOptions
fn clone(&self) -> DjotExportOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more