Expand description
Per-feature selection for djot import/export.
The djot importer and exporter round-trip a set of optional block-level
attributes — paragraph alignment, line height, text direction, non-breakable
lines and background color — through djot’s native {key=value} block
attribute syntax (e.g. {alignment=center} on the line before a paragraph).
These two option structs let a caller choose which of those attributes are
carried. Everything else (headings, lists, tables, blockquotes, code blocks
and all inline formatting) is always imported/exported and is not gated.
Both structs default to all enabled — the fully lossless round-trip. Use
DjotImportOptions::none / DjotExportOptions::none to restrict the
round-trip to the core structural and inline feature set only.
The attribute keys used on the wire are the model field names:
alignment, line_height, direction, non_breakable_lines,
background_color. Block attributes are only emitted/read for standalone
paragraphs and headings; list items, code blocks and table cells normalise
their block styling away (the same boundary the other targets observe).
Structs§
- Djot
Export Options - 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. - Djot
Import Options - Selects which optional block attributes the djot importer applies to the document model. An attribute present in the source but disabled here is parsed and discarded, exactly like an unrepresentable construct.