Expand description
Structural diff over AdfDocument.
Produces an in-memory IR (Diff) that the diff_format module renders
into the YAML output for confluence_compare. The diff is structurally
aware: it walks the ADF tree, splits documents into heading-delimited
sections, and emits per-block change records rather than character-level
deltas over a serialization. See the design notes in issue #706.
Node identity uses a three-tier matcher:
- Natural-key:
attrs.localIdfortable/tableRow/tableCell,attrs.idformedia/mention,attrs.urlforinlineCard/blockCard, top-levellocalIdforexpand/nestedExpand. - Content-hash: stable hash of the canonicalized subtree, bucketed by node type. Catches “moved without edit” cases.
- Positional: index-based pairing of the residual.
Structs§
- Cell
Delta - A single modified cell.
- Code
Block Delta - Code-block change.
- Diff
- Diff between two ADF documents.
- Diff
Options - Diff configuration.
- Diff
Stats - Aggregate counts across the diff.
- List
Delta - List change.
- Node
Snapshot - Snapshot of a block as plain text, used for added/removed entries.
- Opaque
Delta - Fallback delta for block types without a specialized renderer.
- Paragraph
Delta - Paragraph-level prose change.
- Section
Diff - A single section-level diff entry.
- Table
Delta - Table change (one or more cells modified).
Enums§
- Change
Kind - Coarse change classification.
- Node
Delta - A per-block delta inside a section.
Functions§
- diff_
documents - Computes a structural diff between two ADF documents.