Expand description
Semantic tree diff.
The diff engine compares two Documents at the semantic level, never at
the source-text level. It emits an ordered Patch of Operations that
can be replayed to transform old into new.
The implementation is a Myers-style block LCS over top-level blocks. For nested structures (lists, tables, quotes) the inner diff is approximated by re-running the same algorithm over the child vectors.
Structs§
Enums§
Functions§
- apply
- Apply a patch to a document, returning the new document.
- diff
- Diff two documents, returning a
Patch. - inlines_
equal_ ignoring_ ws - Compare two inline sequences. Returns true if they are equivalent under a whitespace-insensitive comparison. Currently exact — kept as a hook for future fuzzy matching.