30467600bc
Front-door limpio: solo crates del dominio; Llimphi y lo fundacional por git-dep del monorepo gioser.git. cargo check pasa (40 crates, 0 errores). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
814 B
814 B
pluma-editor-cuerpo
Text ↔ atoms editor with diff (greedy) for pluma.
EditorCuerpo { texto, atom_ids }. from_cuerpo(c, atoms) concatenates with SEPARADOR = "\n\n". parrafos() retrieves the current split. diff(atoms_originales) -> Vec<CambioAtom> with greedy content-matching: matching paragraphs are skipped, differing ones emit Mutar reusing the Uuid (live threads), excess emits Crear or Eliminar. aplicar_cambios(cambios, nuevos_ids) extends/removes atom_ids after persisting.
API
use pluma_editor_cuerpo::EditorCuerpo;
let mut e = EditorCuerpo::from_cuerpo(&c, &atoms);
e.set_texto(nuevo);
let cambios = e.diff(&atoms_originales);
Deps
pluma-core,pluma-cuerposerde,uuid