Skip to main content

Crate bekoedit_markdown

Crate bekoedit_markdown 

Source
Expand description

Markdown parser index, block identity, raw islands, source patch engine, and form-edit resolution for bekoedit.

Implements the source-preservation core specified by:

  • RFC-013: Markdown Parser Index and Source Range Mapping
  • RFC-014: Block Identity, Revision Scope, and Projection Validity
  • RFC-015: SourcePatch Engine and Source-Preserving Mutation
  • RFC-016/017/018: Form Mode projection, Raw Markdown Islands, and semantic edit commands (Rust-side resolution)

Architectural invariants (RFC-000):

  • The raw Markdown text is canonical; everything in this crate is a projection over it or a validated mutation of it.
  • All byte ranges are Rust-owned UTF-8 byte offsets. Offsets supplied by the UI layer are advisory and never authoritative.
  • Regions that cannot be edited safely become Raw Markdown Islands; they are never silently rewritten.

Re-exports§

pub use block::BlockKind;
pub use block::BlockNode;
pub use block::EditablePolicy;
pub use block::HeadingNode;
pub use block::ListItemNode;
pub use fingerprint::BlockFingerprint;
pub use fingerprint::BlockId;
pub use form::FormBlock;
pub use form::FormBlockDisplay;
pub use form::FormBlockEdit;
pub use form::FormEditCommand;
pub use form::FormEditError;
pub use form::FormListItem;
pub use form::FormProjection;
pub use form::InlineFormat;
pub use index::MarkdownDiagnostic;
pub use index::MarkdownIndex;
pub use island::RawIsland;
pub use island::RawIslandEditPolicy;
pub use island::RawIslandType;
pub use patch::PatchError;
pub use patch::PatchOrigin;
pub use patch::PatchResult;
pub use patch::SourcePatch;
pub use preview::render_preview_html;
pub use range::ByteRange;
pub use range::utf16_to_utf8_offset;
pub use sections::SectionError;
pub use sections::SectionMoveResult;
pub use sections::move_section_down;
pub use sections::move_section_up;
pub use sections::section_range;
pub use trivia::CodeFenceStyle;
pub use trivia::LineEnding;
pub use trivia::ListMarkerStyle;
pub use trivia::SourceTrivia;

Modules§

block
Block-level model produced by the Markdown indexer (RFC-013).
fingerprint
Revision-scoped block identity and fingerprints (RFC-014).
form
Form Mode projection and semantic edit commands (RFC-016 surface, RFC-017 islands, RFC-018 command set).
index
The MarkdownIndex: a disposable, rebuildable projection of canonical Markdown text into top-level blocks with Rust-owned source ranges (RFC-013), revision-scoped identity (RFC-014), and Raw Markdown Islands (RFC-017).
island
Raw Markdown Islands (RFC-017).
patch
The SourcePatch engine (RFC-015): the only path through which canonical Markdown text is mutated.
preview
Safe Preview Mode rendering (RFC-012, RFC-038).
range
Rust-owned UTF-8 byte ranges into canonical Markdown text.
sections
Outline-based document section operations (RFC-029).
trivia
Source trivia: stylistic source details that must be preserved.