Render from OrgCore's lossless tree #2

open cmc opened this on 2026-10-04 22:42 UTC

Discussion

cmc 2026-10-04 22:42 UTC

A new Swift package, OrgCore, is planned as the parser for a native org editor. It produces a lossless syntax tree: every node carries a UTF-16 source range, sections contain their content and child sections, and property drawers, planning lines, LOGBOOK/CLOCK, comments and #+TBLFM stay in the tree.

Once OrgCore is stable, OrgSwift should render from that tree instead of OrgParser, so there is one org parser across the Apple apps.

Scope:

  • Replace OrgParser/OrgInlineParser with an adapter from the OrgCore tree to the existing renderers (OrgHTMLTreeRenderer, OrgAttributedStringRenderer, OrgLayoutBuilder), or port the renderers to the new tree directly.
  • OrgCore ports OrgSwift's inline rules (emphasis borders, links, timestamps), so behaviour should carry over.
  • Conformance against org-conformance must stay at its current 12/13.

Blocked on OrgCore reaching a usable state.